Swarm
swarmorg_mw2
http://www.swarm.org/wiki/Main_Page
MediaWiki 1.26.0
first-letter
Media
Special
Talk
User
User talk
Swarm
Swarm talk
File
File talk
MediaWiki
MediaWiki talk
Template
Template talk
Help
Help talk
Category
Category talk
ABMResourceNavigation
0
2
6
2015-03-07T05:16:34Z
Pauljohn32
1
Created page with " ==Complete kits and platforms== ===Open source=== (must be freely distributable under an open source license, i.e. "free as in speech" as defined by the superset..."
wikitext
text/x-wiki
==Complete kits and platforms==
===Open source===
(must be freely distributable under an open source license, i.e. "free as in speech" as defined by the superset of the [http://opensource.org/docs/definition.php Open Source Definition from the Open Source Initiative] and the [http://www.gnu.org/licenses/license-list.html Free Software Foundation])
*'''[http://agents.felk.cvut.cz/aglobe A-globe]'''
*'''[http://www.alphaworks.ibm.com/tech/able ABLE]'''
*'''[http://ascape.sourceforge.net Ascape]'''
*'''[http://www.spiderland.org/breve/ Breve]'''
*'''[http://cormas.cirad.fr/en/outil/outil.htm Cormas]''' "Cormas is a programming environment dedicated to the creation of multi-agent systems, with a specificity in the domain of natural-resources management. It provides a framework for developing simulation models of coordination modes between individuals and groups that jointly exploit common resources."
*'''[http://www.cougaar.org/ Cougaar]'''
*'''[http://ecolab.sourceforge.net EcoLab]'''
*'''[http://omicrongroup.org/evo/ EVO]'''
*'''[http://sharon.cselt.it/projects/jade/ JADE]'''
*'''[http://jaslibrary.sourceforge.net JAS]'''
*'''[http://cs.gmu.edu/~eclab/projects/mason/ MASON]'''
*'''[http://www.metascapeabm.com/index.php?option=com_content&task=view&id=19&Itemid=61 metaABM]''' (A meta-modeling environment supporting multiple ABM platforms)
*'''[http://www.avignon.inra.fr/internet/unites/biometrie/mobidyc_projet/english/version_index_html Mobidyc]''' "The free software for building and running Individual Based Models with no computer skill. Mobidyc is a software project that aims to promote Individual-Based Modelling in the field of ecology, biology and environment."
*'''[http://ccl.northwestern.edu/netlogo/ NetLogo]'''
*'''[http://quicksilver.tigris.org/ Quicksilver]'''
*'''[http://repast.sourceforge.net Repast]'''
*'''[http://www.cs.bham.ac.uk/~axs/cog_affect/sim_agent.html SIM_AGENT]'''
*'''[http://www.simsesam.de SeSAm]'''
*'''[http://simpy.sourceforge.net/ SimPy]'''
*'''[http://www.swarm.org Swarm]'''
*'''[http://www.primordion.com/Xholon Xholon]'''
*'''[http://labs.bt.com/projects/agents/zeus/ Zeus]'''
===Freeware===
(available for free "as in beer", source may or may not necessarily be available, if source is available it is not under an open-source license)
*'''[http://dextk.org deX]'''
*'''[http://education.mit.edu/starlogo/ StarLogo]'''
*'''[http://ccl.northwestern.edu/cm/StarLogoT/ StarLogoT]'''
*'''[http://visualbots.com/ VisualBots]''' -- Easy to use multi-agent simulator for Microsoft Excel - Visual Basic syntax, rich object model, documentation, sample simulations
===Proprietary===
*'''[http://agentsheets.com/ AgentSheets]'''
*'''[http://www.chiinc.com/products/products_igen.htm iGEN]'''
*'''[http://www.xjtek.com AnyLogic]'''
*'''[http://mass.aitia.ai MASS]'''
==Swarm add-ons and extensions==
*'''[[COSMIC]]''' -- General simulation utility classes, provided by the Complex Systems Modelling Group at Imperial College
*'''[http://www.humboldt.edu/~ecomodel/ EcoSwarm@HSU]''' -- Modeling tools for use with the Swarm simulation system
*'''[http://me.in-berlin.de/~rws/logzone_toc.html LogZone]''' -- Zone exploration tool.
==Related tools and technologies==
*'''[http://www.me.mtu.edu/%7Ermdsouza/ABM_GPU.html Agent-based simulation on Graphics Processing Units]'''. Roshan D'Souza at [http://www.me.mtu.edu/ Michigan Tech's Mechanical Engineering department] has been working on ultra-high-speed agent-based modeling using direct programming of Graphics Processing Units (gaming chips). He has, for example, run Sugarscape with 2 million agents updating over 50 times per second with graphical output. [[Image:SugarScape_GPU.pdf|Here is a paper on this work.]]
*'''[http://www.fipa.org/ FIPA]'''. "FIPA is an IEEE Computer Society standards organization that promotes agent-based technology and the interoperability of its standards with other technologies."
*'''[[Objective-C]]'''
==General==
*Leigh Tesfatsion's '''[http://www.econ.iastate.edu/tesfatsi/acecode.htm Resource Site for Agent-Based Software and Toolkits]'''
*Steve Railsback, Steve Lytinen, and Steve Jackson's '''[http://condor.depaul.edu/~slytinen/abm/StupidModel ABM template model site]'''
1dd55e706cf0d3792c9aba09618b0a0bccafd2e8
ABM Resources
0
10
2194
2193
2016-06-06T21:44:13Z
SRogers
8
/* Open source */
wikitext
text/x-wiki
==Complete kits and platforms==
===Open source===
(must be freely distributable under an open source license, i.e. "free as in speech" as defined by the superset of the [http://opensource.org/docs/definition.php Open Source Definition from the Open Source Initiative] and the [http://www.gnu.org/licenses/license-list.html Free Software Foundation])
*'''[http://agents.felk.cvut.cz/aglobe A-globe]'''
*'''[http://www.alphaworks.ibm.com/tech/able ABLE]'''
*'''[http://ascape.sourceforge.net Ascape]'''
*'''[http://www.spiderland.org/breve/ Breve]'''
*'''[http://cormas.cirad.fr/en/outil/outil.htm Cormas]''' "Cormas is a programming environment dedicated to the creation of multi-agent systems, with a specificity in the domain of natural-resources management. It provides a framework for developing simulation models of coordination modes between individuals and groups that jointly exploit common resources."
*'''[http://www.cougaar.org/ Cougaar]'''
*'''[http://ecolab.sourceforge.net EcoLab]'''
*'''[http://omicrongroup.org/evo/ EVO]'''
*'''[http://sharon.cselt.it/projects/jade/ JADE]'''
*'''[http://jaslibrary.sourceforge.net JAS]'''
*'''[http://cs.gmu.edu/~eclab/projects/mason/ MASON]'''
*'''[https://pypi.python.org/pypi/Mesa/ Mesa]'''
*'''[http://www.metascapeabm.com/index.php?option=com_content&task=view&id=19&Itemid=61 metaABM]''' (A meta-modeling environment supporting multiple ABM platforms)
*'''[http://www.avignon.inra.fr/internet/unites/biometrie/mobidyc_projet/english/version_index_html Mobidyc]''' "The free software for building and running Individual Based Models with no computer skill. Mobidyc is a software project that aims to promote Individual-Based Modelling in the field of ecology, biology and environment."
*'''[http://ccl.northwestern.edu/netlogo/ NetLogo]'''
*'''[http://quicksilver.tigris.org/ Quicksilver]'''
*'''[http://repast.sourceforge.net Repast]'''
*'''[http://www.cs.bham.ac.uk/~axs/cog_affect/sim_agent.html SIM_AGENT]'''
*'''[http://www.simsesam.de SeSAm]'''
*'''[https://pypi.python.org/pypi/simpy SimPy]'''
*'''[http://www.swarm.org Swarm]'''
*'''[http://www.primordion.com/Xholon Xholon]'''
*'''[http://labs.bt.com/projects/agents/zeus/ Zeus]'''
===Freeware===
(available for free "as in beer", source may or may not necessarily be available, if source is available it is not under an open-source license)
*'''[http://dextk.org deX]'''
*'''[http://education.mit.edu/starlogo/ StarLogo]'''
*'''[http://ccl.northwestern.edu/cm/StarLogoT/ StarLogoT]'''
*'''[http://visualbots.com/ VisualBots]''' -- Easy to use multi-agent simulator for Microsoft Excel - Visual Basic syntax, rich object model, documentation, sample simulations
===Proprietary===
*'''[http://agentsheets.com/ AgentSheets]'''
*'''[http://www.chiinc.com/products/products_igen.htm iGEN]'''
*'''[http://www.xjtek.com AnyLogic]'''
*'''[http://mass.aitia.ai MASS]'''
==Swarm add-ons and extensions==
*'''[[COSMIC]]''' -- General simulation utility classes, provided by the Complex Systems Modelling Group at Imperial College
*'''[http://www.humboldt.edu/~ecomodel/ EcoSwarm@HSU]''' -- Modeling tools for use with the Swarm simulation system
*'''[http://me.in-berlin.de/~rws/logzone_toc.html LogZone]''' -- Zone exploration tool.
==Related tools and technologies==
*'''[http://www.me.mtu.edu/%7Ermdsouza/ABM_GPU.html Agent-based simulation on Graphics Processing Units]'''. Roshan D'Souza at [http://www.me.mtu.edu/ Michigan Tech's Mechanical Engineering department] has been working on ultra-high-speed agent-based modeling using direct programming of Graphics Processing Units (gaming chips). He has, for example, run Sugarscape with 2 million agents updating over 50 times per second with graphical output. [[Image:SugarScape_GPU.pdf|Here is a paper on this work.]]
*'''[http://www.fipa.org/ FIPA]'''. "FIPA is an IEEE Computer Society standards organization that promotes agent-based technology and the interoperability of its standards with other technologies."
*'''[[Objective-C]]'''
==General==
*Leigh Tesfatsion's '''[http://www.econ.iastate.edu/tesfatsi/acecode.htm Resource Site for Agent-Based Software and Toolkits]'''
*Steve Railsback, Steve Lytinen, and Steve Jackson's '''[http://condor.depaul.edu/~slytinen/abm/StupidModel ABM template model site]'''
=Why and How to do Agent- and Individual-based Modeling=
This page provides citations for materials to help people understand when to use agent-based modeling, and how to design and use ABMs. '''Please add useful citations!'''
* ''Railsback, S. F., and V. Grimm. 2012. Agent-based and individual-based modeling: a practical introduction. Princeton University Press, Princeton, New Jersey.'' This is a textbook for classes and self-instruction on scientific agent-based modeling. It uses NetLogo as a software platform. The book focuses on modeling concepts, theory, and methodology and how to implement them in NetLogo. See: http://www.railsback-grimm-abm-book.com/.
* ''Salamon, T. 2011. Design of Agent-Based Models : Developing Computer Simulations for a Better Understanding of Social Processes. Repin, Czech Republic: Bruckner Publishing'' This monograph provides an overview of the principles of agent technologies and is primarily focused on the design and development process of agent-based models. See: http://www.designofagentbasedmodels.info/.
* ''DeAngelis, D.L. & W.M. Mooij. 2005 Individual-based modeling of ecological and evolutionary processes. Annual Reviews in Ecology, Evolution and Systematics 36: 147-168.'' The authors attempted to identify all the publications using individual-based models in ecology. They look at the kinds of problems and subjects that this approach has been applied to.
* ''Grimm, V. 1999. Ten years of individual-based modelling in ecology: what have we learned and what could we learn in the future? Ecological Modelling 115:129-148.'' This paper reviews the status of individual-based modeling in ecology as of about 1998, focusing especially on the links (or lack thereof) between models and theory.
* ''Grimm, V., and S. F. Railsback. 2005. Individual-based modeling and ecology. Princeton University Press, Princeton, New Jersey.'' This book addresses the full cycle of designing, testing, using, and publishing agent-based models, and should be useful even for non-ecologists. Additional information is at: http://www.pupress.princeton.edu/titles/8108.html
* ''Grimm, V., E. Revilla, U. Berger, F. Jeltsch, W. M. Mooij, S. F. Railsback, H.-H. Thulke, J. Weiner, T. Wiegand, and D. L. DeAngelis. 2005. Pattern-oriented modeling of agent-based complex systems: lessons from ecology. Science 310:987-991.'' This paper discusses how to address 3 major problems in applying agent-based models to real-world problems: how do you design models that are complex enough but not too complex? how do you develop and test the theory used in your model? and how can you find good parameter values?
*''Grimm, V., U. Berger, F. Bastiansen, S. Eliassen, V. Ginot, J. Giske, J. Goss-Custard, T. Grand, S. Heinz, G. Huse, A. Huth, J. U. Jepsen, C. Jørgensen, W. M. Mooij, B. Müller, G. Pe’er, C. Piou, S. F. Railsback, A. M. Robbins, M. M. Robbins, E. Rossmanith, N. Rüger, E. Strand, S. Souissi, R. A. Stillman, R. Vabø, U. Visser, and D. L. DeAngelis. 2006. A standard protocol for describing individual-based and agent-based models. Ecological Modelling 198:115-296.'' How can you describe an ABM (e.g., in model documentation or a publication) in such a way that its essential characteristics can be understood easily, while still providing all the details? This paper recommends a standard protocol for describing models, which is also a good way to think about models as they are being designed. The on-line appendices provide example descriptions of many models.
* There are many useful resources on [http://www.econ.iastate.edu/tesfatsi/ace.htm Leigh Tesfatsion's site].
465444b0b5fd2456a6969deccb4b583e53e2f436
2193
2150
2016-06-06T21:36:27Z
SRogers
8
/* Open source */
wikitext
text/x-wiki
==Complete kits and platforms==
===Open source===
(must be freely distributable under an open source license, i.e. "free as in speech" as defined by the superset of the [http://opensource.org/docs/definition.php Open Source Definition from the Open Source Initiative] and the [http://www.gnu.org/licenses/license-list.html Free Software Foundation])
*'''[http://agents.felk.cvut.cz/aglobe A-globe]'''
*'''[http://www.alphaworks.ibm.com/tech/able ABLE]'''
*'''[http://ascape.sourceforge.net Ascape]'''
*'''[http://www.spiderland.org/breve/ Breve]'''
*'''[http://cormas.cirad.fr/en/outil/outil.htm Cormas]''' "Cormas is a programming environment dedicated to the creation of multi-agent systems, with a specificity in the domain of natural-resources management. It provides a framework for developing simulation models of coordination modes between individuals and groups that jointly exploit common resources."
*'''[http://www.cougaar.org/ Cougaar]'''
*'''[http://ecolab.sourceforge.net EcoLab]'''
*'''[http://omicrongroup.org/evo/ EVO]'''
*'''[http://sharon.cselt.it/projects/jade/ JADE]'''
*'''[http://jaslibrary.sourceforge.net JAS]'''
*'''[http://cs.gmu.edu/~eclab/projects/mason/ MASON]'''
*'''[http://www.metascapeabm.com/index.php?option=com_content&task=view&id=19&Itemid=61 metaABM]''' (A meta-modeling environment supporting multiple ABM platforms)
*'''[http://www.avignon.inra.fr/internet/unites/biometrie/mobidyc_projet/english/version_index_html Mobidyc]''' "The free software for building and running Individual Based Models with no computer skill. Mobidyc is a software project that aims to promote Individual-Based Modelling in the field of ecology, biology and environment."
*'''[http://ccl.northwestern.edu/netlogo/ NetLogo]'''
*'''[http://quicksilver.tigris.org/ Quicksilver]'''
*'''[http://repast.sourceforge.net Repast]'''
*'''[http://www.cs.bham.ac.uk/~axs/cog_affect/sim_agent.html SIM_AGENT]'''
*'''[http://www.simsesam.de SeSAm]'''
*'''[https://pypi.python.org/pypi/simpy SimPy]'''
*'''[http://www.swarm.org Swarm]'''
*'''[http://www.primordion.com/Xholon Xholon]'''
*'''[http://labs.bt.com/projects/agents/zeus/ Zeus]'''
===Freeware===
(available for free "as in beer", source may or may not necessarily be available, if source is available it is not under an open-source license)
*'''[http://dextk.org deX]'''
*'''[http://education.mit.edu/starlogo/ StarLogo]'''
*'''[http://ccl.northwestern.edu/cm/StarLogoT/ StarLogoT]'''
*'''[http://visualbots.com/ VisualBots]''' -- Easy to use multi-agent simulator for Microsoft Excel - Visual Basic syntax, rich object model, documentation, sample simulations
===Proprietary===
*'''[http://agentsheets.com/ AgentSheets]'''
*'''[http://www.chiinc.com/products/products_igen.htm iGEN]'''
*'''[http://www.xjtek.com AnyLogic]'''
*'''[http://mass.aitia.ai MASS]'''
==Swarm add-ons and extensions==
*'''[[COSMIC]]''' -- General simulation utility classes, provided by the Complex Systems Modelling Group at Imperial College
*'''[http://www.humboldt.edu/~ecomodel/ EcoSwarm@HSU]''' -- Modeling tools for use with the Swarm simulation system
*'''[http://me.in-berlin.de/~rws/logzone_toc.html LogZone]''' -- Zone exploration tool.
==Related tools and technologies==
*'''[http://www.me.mtu.edu/%7Ermdsouza/ABM_GPU.html Agent-based simulation on Graphics Processing Units]'''. Roshan D'Souza at [http://www.me.mtu.edu/ Michigan Tech's Mechanical Engineering department] has been working on ultra-high-speed agent-based modeling using direct programming of Graphics Processing Units (gaming chips). He has, for example, run Sugarscape with 2 million agents updating over 50 times per second with graphical output. [[Image:SugarScape_GPU.pdf|Here is a paper on this work.]]
*'''[http://www.fipa.org/ FIPA]'''. "FIPA is an IEEE Computer Society standards organization that promotes agent-based technology and the interoperability of its standards with other technologies."
*'''[[Objective-C]]'''
==General==
*Leigh Tesfatsion's '''[http://www.econ.iastate.edu/tesfatsi/acecode.htm Resource Site for Agent-Based Software and Toolkits]'''
*Steve Railsback, Steve Lytinen, and Steve Jackson's '''[http://condor.depaul.edu/~slytinen/abm/StupidModel ABM template model site]'''
=Why and How to do Agent- and Individual-based Modeling=
This page provides citations for materials to help people understand when to use agent-based modeling, and how to design and use ABMs. '''Please add useful citations!'''
* ''Railsback, S. F., and V. Grimm. 2012. Agent-based and individual-based modeling: a practical introduction. Princeton University Press, Princeton, New Jersey.'' This is a textbook for classes and self-instruction on scientific agent-based modeling. It uses NetLogo as a software platform. The book focuses on modeling concepts, theory, and methodology and how to implement them in NetLogo. See: http://www.railsback-grimm-abm-book.com/.
* ''Salamon, T. 2011. Design of Agent-Based Models : Developing Computer Simulations for a Better Understanding of Social Processes. Repin, Czech Republic: Bruckner Publishing'' This monograph provides an overview of the principles of agent technologies and is primarily focused on the design and development process of agent-based models. See: http://www.designofagentbasedmodels.info/.
* ''DeAngelis, D.L. & W.M. Mooij. 2005 Individual-based modeling of ecological and evolutionary processes. Annual Reviews in Ecology, Evolution and Systematics 36: 147-168.'' The authors attempted to identify all the publications using individual-based models in ecology. They look at the kinds of problems and subjects that this approach has been applied to.
* ''Grimm, V. 1999. Ten years of individual-based modelling in ecology: what have we learned and what could we learn in the future? Ecological Modelling 115:129-148.'' This paper reviews the status of individual-based modeling in ecology as of about 1998, focusing especially on the links (or lack thereof) between models and theory.
* ''Grimm, V., and S. F. Railsback. 2005. Individual-based modeling and ecology. Princeton University Press, Princeton, New Jersey.'' This book addresses the full cycle of designing, testing, using, and publishing agent-based models, and should be useful even for non-ecologists. Additional information is at: http://www.pupress.princeton.edu/titles/8108.html
* ''Grimm, V., E. Revilla, U. Berger, F. Jeltsch, W. M. Mooij, S. F. Railsback, H.-H. Thulke, J. Weiner, T. Wiegand, and D. L. DeAngelis. 2005. Pattern-oriented modeling of agent-based complex systems: lessons from ecology. Science 310:987-991.'' This paper discusses how to address 3 major problems in applying agent-based models to real-world problems: how do you design models that are complex enough but not too complex? how do you develop and test the theory used in your model? and how can you find good parameter values?
*''Grimm, V., U. Berger, F. Bastiansen, S. Eliassen, V. Ginot, J. Giske, J. Goss-Custard, T. Grand, S. Heinz, G. Huse, A. Huth, J. U. Jepsen, C. Jørgensen, W. M. Mooij, B. Müller, G. Pe’er, C. Piou, S. F. Railsback, A. M. Robbins, M. M. Robbins, E. Rossmanith, N. Rüger, E. Strand, S. Souissi, R. A. Stillman, R. Vabø, U. Visser, and D. L. DeAngelis. 2006. A standard protocol for describing individual-based and agent-based models. Ecological Modelling 198:115-296.'' How can you describe an ABM (e.g., in model documentation or a publication) in such a way that its essential characteristics can be understood easily, while still providing all the details? This paper recommends a standard protocol for describing models, which is also a good way to think about models as they are being designed. The on-line appendices provide example descriptions of many models.
* There are many useful resources on [http://www.econ.iastate.edu/tesfatsi/ace.htm Leigh Tesfatsion's site].
42d9b0af95743e5c72e8bac6e98c53b230f93eef
2150
23
2015-11-30T22:51:41Z
SwarmWikiSysop
5
/* FIXME FIXME */
wikitext
text/x-wiki
==Complete kits and platforms==
===Open source===
(must be freely distributable under an open source license, i.e. "free as in speech" as defined by the superset of the [http://opensource.org/docs/definition.php Open Source Definition from the Open Source Initiative] and the [http://www.gnu.org/licenses/license-list.html Free Software Foundation])
*'''[http://agents.felk.cvut.cz/aglobe A-globe]'''
*'''[http://www.alphaworks.ibm.com/tech/able ABLE]'''
*'''[http://ascape.sourceforge.net Ascape]'''
*'''[http://www.spiderland.org/breve/ Breve]'''
*'''[http://cormas.cirad.fr/en/outil/outil.htm Cormas]''' "Cormas is a programming environment dedicated to the creation of multi-agent systems, with a specificity in the domain of natural-resources management. It provides a framework for developing simulation models of coordination modes between individuals and groups that jointly exploit common resources."
*'''[http://www.cougaar.org/ Cougaar]'''
*'''[http://ecolab.sourceforge.net EcoLab]'''
*'''[http://omicrongroup.org/evo/ EVO]'''
*'''[http://sharon.cselt.it/projects/jade/ JADE]'''
*'''[http://jaslibrary.sourceforge.net JAS]'''
*'''[http://cs.gmu.edu/~eclab/projects/mason/ MASON]'''
*'''[http://www.metascapeabm.com/index.php?option=com_content&task=view&id=19&Itemid=61 metaABM]''' (A meta-modeling environment supporting multiple ABM platforms)
*'''[http://www.avignon.inra.fr/internet/unites/biometrie/mobidyc_projet/english/version_index_html Mobidyc]''' "The free software for building and running Individual Based Models with no computer skill. Mobidyc is a software project that aims to promote Individual-Based Modelling in the field of ecology, biology and environment."
*'''[http://ccl.northwestern.edu/netlogo/ NetLogo]'''
*'''[http://quicksilver.tigris.org/ Quicksilver]'''
*'''[http://repast.sourceforge.net Repast]'''
*'''[http://www.cs.bham.ac.uk/~axs/cog_affect/sim_agent.html SIM_AGENT]'''
*'''[http://www.simsesam.de SeSAm]'''
*'''[http://simpy.sourceforge.net/ SimPy]'''
*'''[http://www.swarm.org Swarm]'''
*'''[http://www.primordion.com/Xholon Xholon]'''
*'''[http://labs.bt.com/projects/agents/zeus/ Zeus]'''
===Freeware===
(available for free "as in beer", source may or may not necessarily be available, if source is available it is not under an open-source license)
*'''[http://dextk.org deX]'''
*'''[http://education.mit.edu/starlogo/ StarLogo]'''
*'''[http://ccl.northwestern.edu/cm/StarLogoT/ StarLogoT]'''
*'''[http://visualbots.com/ VisualBots]''' -- Easy to use multi-agent simulator for Microsoft Excel - Visual Basic syntax, rich object model, documentation, sample simulations
===Proprietary===
*'''[http://agentsheets.com/ AgentSheets]'''
*'''[http://www.chiinc.com/products/products_igen.htm iGEN]'''
*'''[http://www.xjtek.com AnyLogic]'''
*'''[http://mass.aitia.ai MASS]'''
==Swarm add-ons and extensions==
*'''[[COSMIC]]''' -- General simulation utility classes, provided by the Complex Systems Modelling Group at Imperial College
*'''[http://www.humboldt.edu/~ecomodel/ EcoSwarm@HSU]''' -- Modeling tools for use with the Swarm simulation system
*'''[http://me.in-berlin.de/~rws/logzone_toc.html LogZone]''' -- Zone exploration tool.
==Related tools and technologies==
*'''[http://www.me.mtu.edu/%7Ermdsouza/ABM_GPU.html Agent-based simulation on Graphics Processing Units]'''. Roshan D'Souza at [http://www.me.mtu.edu/ Michigan Tech's Mechanical Engineering department] has been working on ultra-high-speed agent-based modeling using direct programming of Graphics Processing Units (gaming chips). He has, for example, run Sugarscape with 2 million agents updating over 50 times per second with graphical output. [[Image:SugarScape_GPU.pdf|Here is a paper on this work.]]
*'''[http://www.fipa.org/ FIPA]'''. "FIPA is an IEEE Computer Society standards organization that promotes agent-based technology and the interoperability of its standards with other technologies."
*'''[[Objective-C]]'''
==General==
*Leigh Tesfatsion's '''[http://www.econ.iastate.edu/tesfatsi/acecode.htm Resource Site for Agent-Based Software and Toolkits]'''
*Steve Railsback, Steve Lytinen, and Steve Jackson's '''[http://condor.depaul.edu/~slytinen/abm/StupidModel ABM template model site]'''
=Why and How to do Agent- and Individual-based Modeling=
This page provides citations for materials to help people understand when to use agent-based modeling, and how to design and use ABMs. '''Please add useful citations!'''
* ''Railsback, S. F., and V. Grimm. 2012. Agent-based and individual-based modeling: a practical introduction. Princeton University Press, Princeton, New Jersey.'' This is a textbook for classes and self-instruction on scientific agent-based modeling. It uses NetLogo as a software platform. The book focuses on modeling concepts, theory, and methodology and how to implement them in NetLogo. See: http://www.railsback-grimm-abm-book.com/.
* ''Salamon, T. 2011. Design of Agent-Based Models : Developing Computer Simulations for a Better Understanding of Social Processes. Repin, Czech Republic: Bruckner Publishing'' This monograph provides an overview of the principles of agent technologies and is primarily focused on the design and development process of agent-based models. See: http://www.designofagentbasedmodels.info/.
* ''DeAngelis, D.L. & W.M. Mooij. 2005 Individual-based modeling of ecological and evolutionary processes. Annual Reviews in Ecology, Evolution and Systematics 36: 147-168.'' The authors attempted to identify all the publications using individual-based models in ecology. They look at the kinds of problems and subjects that this approach has been applied to.
* ''Grimm, V. 1999. Ten years of individual-based modelling in ecology: what have we learned and what could we learn in the future? Ecological Modelling 115:129-148.'' This paper reviews the status of individual-based modeling in ecology as of about 1998, focusing especially on the links (or lack thereof) between models and theory.
* ''Grimm, V., and S. F. Railsback. 2005. Individual-based modeling and ecology. Princeton University Press, Princeton, New Jersey.'' This book addresses the full cycle of designing, testing, using, and publishing agent-based models, and should be useful even for non-ecologists. Additional information is at: http://www.pupress.princeton.edu/titles/8108.html
* ''Grimm, V., E. Revilla, U. Berger, F. Jeltsch, W. M. Mooij, S. F. Railsback, H.-H. Thulke, J. Weiner, T. Wiegand, and D. L. DeAngelis. 2005. Pattern-oriented modeling of agent-based complex systems: lessons from ecology. Science 310:987-991.'' This paper discusses how to address 3 major problems in applying agent-based models to real-world problems: how do you design models that are complex enough but not too complex? how do you develop and test the theory used in your model? and how can you find good parameter values?
*''Grimm, V., U. Berger, F. Bastiansen, S. Eliassen, V. Ginot, J. Giske, J. Goss-Custard, T. Grand, S. Heinz, G. Huse, A. Huth, J. U. Jepsen, C. Jørgensen, W. M. Mooij, B. Müller, G. Pe’er, C. Piou, S. F. Railsback, A. M. Robbins, M. M. Robbins, E. Rossmanith, N. Rüger, E. Strand, S. Souissi, R. A. Stillman, R. Vabø, U. Visser, and D. L. DeAngelis. 2006. A standard protocol for describing individual-based and agent-based models. Ecological Modelling 198:115-296.'' How can you describe an ABM (e.g., in model documentation or a publication) in such a way that its essential characteristics can be understood easily, while still providing all the details? This paper recommends a standard protocol for describing models, which is also a good way to think about models as they are being designed. The on-line appendices provide example descriptions of many models.
* There are many useful resources on [http://www.econ.iastate.edu/tesfatsi/ace.htm Leigh Tesfatsion's site].
b612b1a3a20c9ac78dbb1f9f4d2289dc766dad25
23
20
2015-03-07T06:08:21Z
Pauljohn32
1
wikitext
text/x-wiki
==Complete kits and platforms==
===Open source===
(must be freely distributable under an open source license, i.e. "free as in speech" as defined by the superset of the [http://opensource.org/docs/definition.php Open Source Definition from the Open Source Initiative] and the [http://www.gnu.org/licenses/license-list.html Free Software Foundation])
*'''[http://agents.felk.cvut.cz/aglobe A-globe]'''
*'''[http://www.alphaworks.ibm.com/tech/able ABLE]'''
*'''[http://ascape.sourceforge.net Ascape]'''
*'''[http://www.spiderland.org/breve/ Breve]'''
*'''[http://cormas.cirad.fr/en/outil/outil.htm Cormas]''' "Cormas is a programming environment dedicated to the creation of multi-agent systems, with a specificity in the domain of natural-resources management. It provides a framework for developing simulation models of coordination modes between individuals and groups that jointly exploit common resources."
*'''[http://www.cougaar.org/ Cougaar]'''
*'''[http://ecolab.sourceforge.net EcoLab]'''
*'''[http://omicrongroup.org/evo/ EVO]'''
*'''[http://sharon.cselt.it/projects/jade/ JADE]'''
*'''[http://jaslibrary.sourceforge.net JAS]'''
*'''[http://cs.gmu.edu/~eclab/projects/mason/ MASON]'''
*'''[http://www.metascapeabm.com/index.php?option=com_content&task=view&id=19&Itemid=61 metaABM]''' (A meta-modeling environment supporting multiple ABM platforms)
*'''[http://www.avignon.inra.fr/internet/unites/biometrie/mobidyc_projet/english/version_index_html Mobidyc]''' "The free software for building and running Individual Based Models with no computer skill. Mobidyc is a software project that aims to promote Individual-Based Modelling in the field of ecology, biology and environment."
*'''[http://ccl.northwestern.edu/netlogo/ NetLogo]'''
*'''[http://quicksilver.tigris.org/ Quicksilver]'''
*'''[http://repast.sourceforge.net Repast]'''
*'''[http://www.cs.bham.ac.uk/~axs/cog_affect/sim_agent.html SIM_AGENT]'''
*'''[http://www.simsesam.de SeSAm]'''
*'''[http://simpy.sourceforge.net/ SimPy]'''
*'''[http://www.swarm.org Swarm]'''
*'''[http://www.primordion.com/Xholon Xholon]'''
*'''[http://labs.bt.com/projects/agents/zeus/ Zeus]'''
===Freeware===
(available for free "as in beer", source may or may not necessarily be available, if source is available it is not under an open-source license)
*'''[http://dextk.org deX]'''
*'''[http://education.mit.edu/starlogo/ StarLogo]'''
*'''[http://ccl.northwestern.edu/cm/StarLogoT/ StarLogoT]'''
*'''[http://visualbots.com/ VisualBots]''' -- Easy to use multi-agent simulator for Microsoft Excel - Visual Basic syntax, rich object model, documentation, sample simulations
===Proprietary===
*'''[http://agentsheets.com/ AgentSheets]'''
*'''[http://www.chiinc.com/products/products_igen.htm iGEN]'''
*'''[http://www.xjtek.com AnyLogic]'''
*'''[http://mass.aitia.ai MASS]'''
==Swarm add-ons and extensions==
*'''[[COSMIC]]''' -- General simulation utility classes, provided by the Complex Systems Modelling Group at Imperial College
*'''[http://www.humboldt.edu/~ecomodel/ EcoSwarm@HSU]''' -- Modeling tools for use with the Swarm simulation system
*'''[http://me.in-berlin.de/~rws/logzone_toc.html LogZone]''' -- Zone exploration tool.
==Related tools and technologies==
*'''[http://www.me.mtu.edu/%7Ermdsouza/ABM_GPU.html Agent-based simulation on Graphics Processing Units]'''. Roshan D'Souza at [http://www.me.mtu.edu/ Michigan Tech's Mechanical Engineering department] has been working on ultra-high-speed agent-based modeling using direct programming of Graphics Processing Units (gaming chips). He has, for example, run Sugarscape with 2 million agents updating over 50 times per second with graphical output. [[Image:SugarScape_GPU.pdf|Here is a paper on this work.]]
*'''[http://www.fipa.org/ FIPA]'''. "FIPA is an IEEE Computer Society standards organization that promotes agent-based technology and the interoperability of its standards with other technologies."
*'''[[Objective-C]]'''
==General==
*Leigh Tesfatsion's '''[http://www.econ.iastate.edu/tesfatsi/acecode.htm Resource Site for Agent-Based Software and Toolkits]'''
*Steve Railsback, Steve Lytinen, and Steve Jackson's '''[http://condor.depaul.edu/~slytinen/abm/StupidModel ABM template model site]'''
=FIXME FIXME=
Where does following content go???
=Why and How to do Agent- and Individual-based Modeling=
This page provides citations for materials to help people understand when to use agent-based modeling, and how to design and use ABMs. '''Please add useful citations!'''
* ''Railsback, S. F., and V. Grimm. 2012. Agent-based and individual-based modeling: a practical introduction. Princeton University Press, Princeton, New Jersey.'' This is a textbook for classes and self-instruction on scientific agent-based modeling. It uses NetLogo as a software platform. The book focuses on modeling concepts, theory, and methodology and how to implement them in NetLogo. See: http://www.railsback-grimm-abm-book.com/.
* ''Salamon, T. 2011. Design of Agent-Based Models : Developing Computer Simulations for a Better Understanding of Social Processes. Repin, Czech Republic: Bruckner Publishing'' This monograph provides an overview of the principles of agent technologies and is primarily focused on the design and development process of agent-based models. See: http://www.designofagentbasedmodels.info/.
* ''DeAngelis, D.L. & W.M. Mooij. 2005 Individual-based modeling of ecological and evolutionary processes. Annual Reviews in Ecology, Evolution and Systematics 36: 147-168.'' The authors attempted to identify all the publications using individual-based models in ecology. They look at the kinds of problems and subjects that this approach has been applied to.
* ''Grimm, V. 1999. Ten years of individual-based modelling in ecology: what have we learned and what could we learn in the future? Ecological Modelling 115:129-148.'' This paper reviews the status of individual-based modeling in ecology as of about 1998, focusing especially on the links (or lack thereof) between models and theory.
* ''Grimm, V., and S. F. Railsback. 2005. Individual-based modeling and ecology. Princeton University Press, Princeton, New Jersey.'' This book addresses the full cycle of designing, testing, using, and publishing agent-based models, and should be useful even for non-ecologists. Additional information is at: http://www.pupress.princeton.edu/titles/8108.html
* ''Grimm, V., E. Revilla, U. Berger, F. Jeltsch, W. M. Mooij, S. F. Railsback, H.-H. Thulke, J. Weiner, T. Wiegand, and D. L. DeAngelis. 2005. Pattern-oriented modeling of agent-based complex systems: lessons from ecology. Science 310:987-991.'' This paper discusses how to address 3 major problems in applying agent-based models to real-world problems: how do you design models that are complex enough but not too complex? how do you develop and test the theory used in your model? and how can you find good parameter values?
*''Grimm, V., U. Berger, F. Bastiansen, S. Eliassen, V. Ginot, J. Giske, J. Goss-Custard, T. Grand, S. Heinz, G. Huse, A. Huth, J. U. Jepsen, C. Jørgensen, W. M. Mooij, B. Müller, G. Pe’er, C. Piou, S. F. Railsback, A. M. Robbins, M. M. Robbins, E. Rossmanith, N. Rüger, E. Strand, S. Souissi, R. A. Stillman, R. Vabø, U. Visser, and D. L. DeAngelis. 2006. A standard protocol for describing individual-based and agent-based models. Ecological Modelling 198:115-296.'' How can you describe an ABM (e.g., in model documentation or a publication) in such a way that its essential characteristics can be understood easily, while still providing all the details? This paper recommends a standard protocol for describing models, which is also a good way to think about models as they are being designed. The on-line appendices provide example descriptions of many models.
* There are many useful resources on [http://www.econ.iastate.edu/tesfatsi/ace.htm Leigh Tesfatsion's site].
440b81fd16d43496aeb93eb0ffef5650b2a7f50f
20
19
2015-03-07T06:02:41Z
Pauljohn32
1
wikitext
text/x-wiki
==Complete kits and platforms==
===Open source===
(must be freely distributable under an open source license, i.e. "free as in speech" as defined by the superset of the [http://opensource.org/docs/definition.php Open Source Definition from the Open Source Initiative] and the [http://www.gnu.org/licenses/license-list.html Free Software Foundation])
*'''[http://agents.felk.cvut.cz/aglobe A-globe]'''
*'''[http://www.alphaworks.ibm.com/tech/able ABLE]'''
*'''[http://ascape.sourceforge.net Ascape]'''
*'''[http://www.spiderland.org/breve/ Breve]'''
*'''[http://cormas.cirad.fr/en/outil/outil.htm Cormas]''' "Cormas is a programming environment dedicated to the creation of multi-agent systems, with a specificity in the domain of natural-resources management. It provides a framework for developing simulation models of coordination modes between individuals and groups that jointly exploit common resources."
*'''[http://www.cougaar.org/ Cougaar]'''
*'''[http://ecolab.sourceforge.net EcoLab]'''
*'''[http://omicrongroup.org/evo/ EVO]'''
*'''[http://sharon.cselt.it/projects/jade/ JADE]'''
*'''[http://jaslibrary.sourceforge.net JAS]'''
*'''[http://cs.gmu.edu/~eclab/projects/mason/ MASON]'''
*'''[http://www.metascapeabm.com/index.php?option=com_content&task=view&id=19&Itemid=61 metaABM]''' (A meta-modeling environment supporting multiple ABM platforms)
*'''[http://www.avignon.inra.fr/internet/unites/biometrie/mobidyc_projet/english/version_index_html Mobidyc]''' "The free software for building and running Individual Based Models with no computer skill. Mobidyc is a software project that aims to promote Individual-Based Modelling in the field of ecology, biology and environment."
*'''[http://ccl.northwestern.edu/netlogo/ NetLogo]'''
*'''[http://quicksilver.tigris.org/ Quicksilver]'''
*'''[http://repast.sourceforge.net Repast]'''
*'''[http://www.cs.bham.ac.uk/~axs/cog_affect/sim_agent.html SIM_AGENT]'''
*'''[http://www.simsesam.de SeSAm]'''
*'''[http://simpy.sourceforge.net/ SimPy]'''
*'''[http://www.swarm.org Swarm]'''
*'''[http://www.primordion.com/Xholon Xholon]'''
*'''[http://labs.bt.com/projects/agents/zeus/ Zeus]'''
===Freeware===
(available for free "as in beer", source may or may not necessarily be available, if source is available it is not under an open-source license)
*'''[http://dextk.org deX]'''
*'''[http://education.mit.edu/starlogo/ StarLogo]'''
*'''[http://ccl.northwestern.edu/cm/StarLogoT/ StarLogoT]'''
*'''[http://visualbots.com/ VisualBots]''' -- Easy to use multi-agent simulator for Microsoft Excel - Visual Basic syntax, rich object model, documentation, sample simulations
===Proprietary===
*'''[http://agentsheets.com/ AgentSheets]'''
*'''[http://www.chiinc.com/products/products_igen.htm iGEN]'''
*'''[http://www.xjtek.com AnyLogic]'''
*'''[http://mass.aitia.ai MASS]'''
==Swarm add-ons and extensions==
*'''[[COSMIC]]''' -- General simulation utility classes, provided by the Complex Systems Modelling Group at Imperial College
*'''[http://www.humboldt.edu/~ecomodel/ EcoSwarm@HSU]''' -- Modeling tools for use with the Swarm simulation system
*'''[http://me.in-berlin.de/~rws/logzone_toc.html LogZone]''' -- Zone exploration tool.
==Related tools and technologies==
*'''[http://www.me.mtu.edu/%7Ermdsouza/ABM_GPU.html Agent-based simulation on Graphics Processing Units]'''. Roshan D'Souza at [http://www.me.mtu.edu/ Michigan Tech's Mechanical Engineering department] has been working on ultra-high-speed agent-based modeling using direct programming of Graphics Processing Units (gaming chips). He has, for example, run Sugarscape with 2 million agents updating over 50 times per second with graphical output. [[Image:SugarScape_GPU.pdf|Here is a paper on this work.]]
*'''[http://www.fipa.org/ FIPA]'''. "FIPA is an IEEE Computer Society standards organization that promotes agent-based technology and the interoperability of its standards with other technologies."
*'''[[Objective-C]]'''
==General==
*Leigh Tesfatsion's '''[http://www.econ.iastate.edu/tesfatsi/acecode.htm Resource Site for Agent-Based Software and Toolkits]'''
*Steve Railsback, Steve Lytinen, and Steve Jackson's '''[http://condor.depaul.edu/~slytinen/abm/StupidModel ABM template model site]'''
=FIXME FIXME=
Where does following content go
==Agent- and Individual-based Modeling Resources==
*'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. There are sub-areas for:
**Agent-based modeling community resources, including [[Swarm:_SwarmFest|SwarmFest]], our annual modeling conference
**Software (information on alternative platforms; learning materials; template models; integrated development environments)
**"How and why to do agent-based modeling": techniques and theory
**Resources specific to different scientific domains
*'''modelling@swarm.org: The email community of agent-based modelers.''' This email list discusses topics of general interest to agent-based modelers. [[Swarm:_Mailing_lists|More information and signup here.]]'''
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #FFFFCC" |
[[Image:Small-swarm-logo.jpeg]]
==Swarm Software for Agent-based Modeling==
*'''[[Swarm_main_page|The main Swarm page]]''' for Swarm software, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm: applications|Thanks to Paul Johnson, a new package of applications for Swarm-2.2]]'', particularly for Objective C
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #DAFDDA" |
==Swarm Development Group==
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
*'''[[SDG_membership|Information on SDG membership]]'''
*[https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]
|-
| colspan=2 style="border: 1px solid #c6c9ff; color: #000; padding: .4em .9em .9em; background-color: #d3d3d3" |
==Help==
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
|}
=Why and How to do Agent- and Individual-based Modeling=
This page provides citations for materials to help people understand when to use agent-based modeling, and how to design and use ABMs. '''Please add useful citations!'''
* ''Railsback, S. F., and V. Grimm. 2012. Agent-based and individual-based modeling: a practical introduction. Princeton University Press, Princeton, New Jersey.'' This is a textbook for classes and self-instruction on scientific agent-based modeling. It uses NetLogo as a software platform. The book focuses on modeling concepts, theory, and methodology and how to implement them in NetLogo. See: http://www.railsback-grimm-abm-book.com/.
* ''Salamon, T. 2011. Design of Agent-Based Models : Developing Computer Simulations for a Better Understanding of Social Processes. Repin, Czech Republic: Bruckner Publishing'' This monograph provides an overview of the principles of agent technologies and is primarily focused on the design and development process of agent-based models. See: http://www.designofagentbasedmodels.info/.
* ''DeAngelis, D.L. & W.M. Mooij. 2005 Individual-based modeling of ecological and evolutionary processes. Annual Reviews in Ecology, Evolution and Systematics 36: 147-168.'' The authors attempted to identify all the publications using individual-based models in ecology. They look at the kinds of problems and subjects that this approach has been applied to.
* ''Grimm, V. 1999. Ten years of individual-based modelling in ecology: what have we learned and what could we learn in the future? Ecological Modelling 115:129-148.'' This paper reviews the status of individual-based modeling in ecology as of about 1998, focusing especially on the links (or lack thereof) between models and theory.
* ''Grimm, V., and S. F. Railsback. 2005. Individual-based modeling and ecology. Princeton University Press, Princeton, New Jersey.'' This book addresses the full cycle of designing, testing, using, and publishing agent-based models, and should be useful even for non-ecologists. Additional information is at: http://www.pupress.princeton.edu/titles/8108.html
* ''Grimm, V., E. Revilla, U. Berger, F. Jeltsch, W. M. Mooij, S. F. Railsback, H.-H. Thulke, J. Weiner, T. Wiegand, and D. L. DeAngelis. 2005. Pattern-oriented modeling of agent-based complex systems: lessons from ecology. Science 310:987-991.'' This paper discusses how to address 3 major problems in applying agent-based models to real-world problems: how do you design models that are complex enough but not too complex? how do you develop and test the theory used in your model? and how can you find good parameter values?
*''Grimm, V., U. Berger, F. Bastiansen, S. Eliassen, V. Ginot, J. Giske, J. Goss-Custard, T. Grand, S. Heinz, G. Huse, A. Huth, J. U. Jepsen, C. Jørgensen, W. M. Mooij, B. Müller, G. Pe’er, C. Piou, S. F. Railsback, A. M. Robbins, M. M. Robbins, E. Rossmanith, N. Rüger, E. Strand, S. Souissi, R. A. Stillman, R. Vabø, U. Visser, and D. L. DeAngelis. 2006. A standard protocol for describing individual-based and agent-based models. Ecological Modelling 198:115-296.'' How can you describe an ABM (e.g., in model documentation or a publication) in such a way that its essential characteristics can be understood easily, while still providing all the details? This paper recommends a standard protocol for describing models, which is also a good way to think about models as they are being designed. The on-line appendices provide example descriptions of many models.
* There are many useful resources on [http://www.econ.iastate.edu/tesfatsi/ace.htm Leigh Tesfatsion's site].
88077c18cabdc2a341127d2a13bfeff99ced6f4a
19
2015-03-07T05:53:33Z
Pauljohn32
1
Created page with " ==Complete kits and platforms== ===Open source=== (must be freely distributable under an open source license, i.e. "free as in speech" as defined by the superset o..."
wikitext
text/x-wiki
==Complete kits and platforms==
===Open source===
(must be freely distributable under an open source license, i.e. "free as in speech" as defined by the superset of the [http://opensource.org/docs/definition.php Open Source Definition from the Open Source Initiative] and the [http://www.gnu.org/licenses/license-list.html Free Software Foundation])
*'''[http://agents.felk.cvut.cz/aglobe A-globe]'''
*'''[http://www.alphaworks.ibm.com/tech/able ABLE]'''
*'''[http://ascape.sourceforge.net Ascape]'''
*'''[http://www.spiderland.org/breve/ Breve]'''
*'''[http://cormas.cirad.fr/en/outil/outil.htm Cormas]''' "Cormas is a programming environment dedicated to the creation of multi-agent systems, with a specificity in the domain of natural-resources management. It provides a framework for developing simulation models of coordination modes between individuals and groups that jointly exploit common resources."
*'''[http://www.cougaar.org/ Cougaar]'''
*'''[http://ecolab.sourceforge.net EcoLab]'''
*'''[http://omicrongroup.org/evo/ EVO]'''
*'''[http://sharon.cselt.it/projects/jade/ JADE]'''
*'''[http://jaslibrary.sourceforge.net JAS]'''
*'''[http://cs.gmu.edu/~eclab/projects/mason/ MASON]'''
*'''[http://www.metascapeabm.com/index.php?option=com_content&task=view&id=19&Itemid=61 metaABM]''' (A meta-modeling environment supporting multiple ABM platforms)
*'''[http://www.avignon.inra.fr/internet/unites/biometrie/mobidyc_projet/english/version_index_html Mobidyc]''' "The free software for building and running Individual Based Models with no computer skill. Mobidyc is a software project that aims to promote Individual-Based Modelling in the field of ecology, biology and environment."
*'''[http://ccl.northwestern.edu/netlogo/ NetLogo]'''
*'''[http://quicksilver.tigris.org/ Quicksilver]'''
*'''[http://repast.sourceforge.net Repast]'''
*'''[http://www.cs.bham.ac.uk/~axs/cog_affect/sim_agent.html SIM_AGENT]'''
*'''[http://www.simsesam.de SeSAm]'''
*'''[http://simpy.sourceforge.net/ SimPy]'''
*'''[http://www.swarm.org Swarm]'''
*'''[http://www.primordion.com/Xholon Xholon]'''
*'''[http://labs.bt.com/projects/agents/zeus/ Zeus]'''
===Freeware===
(available for free "as in beer", source may or may not necessarily be available, if source is available it is not under an open-source license)
*'''[http://dextk.org deX]'''
*'''[http://education.mit.edu/starlogo/ StarLogo]'''
*'''[http://ccl.northwestern.edu/cm/StarLogoT/ StarLogoT]'''
*'''[http://visualbots.com/ VisualBots]''' -- Easy to use multi-agent simulator for Microsoft Excel - Visual Basic syntax, rich object model, documentation, sample simulations
===Proprietary===
*'''[http://agentsheets.com/ AgentSheets]'''
*'''[http://www.chiinc.com/products/products_igen.htm iGEN]'''
*'''[http://www.xjtek.com AnyLogic]'''
*'''[http://mass.aitia.ai MASS]'''
==Swarm add-ons and extensions==
*'''[[COSMIC]]''' -- General simulation utility classes, provided by the Complex Systems Modelling Group at Imperial College
*'''[http://www.humboldt.edu/~ecomodel/ EcoSwarm@HSU]''' -- Modeling tools for use with the Swarm simulation system
*'''[http://me.in-berlin.de/~rws/logzone_toc.html LogZone]''' -- Zone exploration tool.
==Related tools and technologies==
*'''[http://www.me.mtu.edu/%7Ermdsouza/ABM_GPU.html Agent-based simulation on Graphics Processing Units]'''. Roshan D'Souza at [http://www.me.mtu.edu/ Michigan Tech's Mechanical Engineering department] has been working on ultra-high-speed agent-based modeling using direct programming of Graphics Processing Units (gaming chips). He has, for example, run Sugarscape with 2 million agents updating over 50 times per second with graphical output. [[Image:SugarScape_GPU.pdf|Here is a paper on this work.]]
*'''[http://www.fipa.org/ FIPA]'''. "FIPA is an IEEE Computer Society standards organization that promotes agent-based technology and the interoperability of its standards with other technologies."
*'''[[Objective-C]]'''
==General==
*Leigh Tesfatsion's '''[http://www.econ.iastate.edu/tesfatsi/acecode.htm Resource Site for Agent-Based Software and Toolkits]'''
*Steve Railsback, Steve Lytinen, and Steve Jackson's '''[http://condor.depaul.edu/~slytinen/abm/StupidModel ABM template model site]'''
59bd0b215cf283ab40779c54e822904ea8c16ae1
Examples of Swarm applications
0
13
25
2015-03-07T06:17:54Z
Pauljohn32
1
Created page with "empty page. Plan was to have some pictures or possibly a video."
wikitext
text/x-wiki
empty page.
Plan was to have some pictures or possibly a video.
3fd3294429d5ae71768d7bad6a8f1efc54a6805a
Main Page
0
1
2244
2235
2024-05-07T17:39:42Z
Gepr
9
pushed old news, added today's election
wikitext
text/x-wiki
Consult the [//meta.wikimedia.org/wiki/Help:Contents MediaWiki User's Guide] for information on using the wiki software.
=News=
==2024-05-07: Director Election==
The current board was re-elected to another 2 year term. See the [[SDG_Directors]] page.
=[[OldNews]]=
==2022-10-25: Quasi-Endowment==
Now that we're re-instated as a valid 501(c)(3) with the IRS (thanks to [https://charitableallies.org/ Charitable Allies] for their help), we are pursuing a "quasi-endowment". Our intention is to invest the remaining funds and use any dividends from that investment to support ABM community members with conference registration fees, travel, etc. We will need to supplement that with donations, as well, because only a percentage of income can be from investment returns. Once we have the investment set up, we'll have an indication of how much we'll need in donations, which will provide the kernel for a fund-raising objective.
==2022-02-22: Officer Election==
Thanks to the exiting officers Matteo Morini & Jim Anderson! The new assignments are ED/President: [[User:gepr|Glen Ropella]], Vice President: Gary An, Treasurer: Ted Carmichael, Secretary: Roger Burkhart.
==2022-01-25: Director Election==
Thanks to the exiting directors Asim Zia, Jim Anderson, Pietro Terna, Ivan Garibay, Steve Railsback, and Mirsad Hadzikadic! The new board comprises: Gary An, Roger Burkhart, Ted Carmichael, Marcus Daniels, Matteo Morini, and [[User:gepr|Glen Ropella]].
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for the Swarm software framework, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
=Agent- and Individual-based Modeling Resources=
'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. '''This area is no longer maintained and we refer interested people to more up-to-date sites such as [http://www.openabm.org/ www.OpenABM.org]'''
There is still information on:
*Agent-based modeling community resources
*Software (information on alternative platforms; learning materials; template models; integrated development environments)
*"How and why to do agent-based modeling": techniques and theory
*Resources specific to different scientific domains
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
af1a8db805c6ce1d843147c8a2f37f4cb2e11f30
2235
2232
2022-10-25T14:49:27Z
Gepr
9
move elections to old news, add note about quasi-endowment
wikitext
text/x-wiki
Consult the [//meta.wikimedia.org/wiki/Help:Contents MediaWiki User's Guide] for information on using the wiki software.
=News=
==2022-10-25: Quasi-Endowment==
Now that we're re-instated as a valid 501(c)(3) with the IRS (thanks to [https://charitableallies.org/ Charitable Allies] for their help), we are pursuing a "quasi-endowment". Our intention is to invest the remaining funds and use any dividends from that investment to support ABM community members with conference registration fees, travel, etc. We will need to supplement that with donations, as well, because only a percentage of income can be from investment returns. Once we have the investment set up, we'll have an indication of how much we'll need in donations, which will provide the kernel for a fund-raising objective.
=[[OldNews]]=
==2022-02-22: Officer Election==
Thanks to the exiting officers Matteo Morini & Jim Anderson! The new assignments are ED/President: [[User:gepr|Glen Ropella]], Vice President: Gary An, Treasurer: Ted Carmichael, Secretary: Roger Burkhart.
==2022-01-25: Director Election==
Thanks to the exiting directors Asim Zia, Jim Anderson, Pietro Terna, Ivan Garibay, Steve Railsback, and Mirsad Hadzikadic! The new board comprises: Gary An, Roger Burkhart, Ted Carmichael, Marcus Daniels, Matteo Morini, and [[User:gepr|Glen Ropella]].
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for the Swarm software framework, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
=Agent- and Individual-based Modeling Resources=
'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. '''This area is no longer maintained and we refer interested people to more up-to-date sites such as [http://www.openabm.org/ www.OpenABM.org]'''
There is still information on:
*Agent-based modeling community resources
*Software (information on alternative platforms; learning materials; template models; integrated development environments)
*"How and why to do agent-based modeling": techniques and theory
*Resources specific to different scientific domains
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
924ba945eaa5bb7416bb01a89b9ee9e18a111f7c
2232
2231
2022-02-22T14:09:38Z
Gepr
9
fixed bullet mistake for old news
wikitext
text/x-wiki
Consult the [//meta.wikimedia.org/wiki/Help:Contents MediaWiki User's Guide] for information on using the wiki software.
=News=
==2022-02-22: Officer Election==
Thanks to the exiting officers Matteo Morini & Jim Anderson! The new assignments are ED/President: [[User:gepr|Glen Ropella]], Vice President: Gary An, Treasurer: Ted Carmichael, Secretary: Roger Burkhart.
==2022-01-25: Director Election==
Thanks to the exiting directors Asim Zia, Jim Anderson, Pietro Terna, Ivan Garibay, Steve Railsback, and Mirsad Hadzikadic! The new board comprises: Gary An, Roger Burkhart, Ted Carmichael, Marcus Daniels, Matteo Morini, and [[User:gepr|Glen Ropella]].
=[[OldNews]]=
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for the Swarm software framework, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
=Agent- and Individual-based Modeling Resources=
'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. '''This area is no longer maintained and we refer interested people to more up-to-date sites such as [http://www.openabm.org/ www.OpenABM.org]'''
There is still information on:
*Agent-based modeling community resources
*Software (information on alternative platforms; learning materials; template models; integrated development environments)
*"How and why to do agent-based modeling": techniques and theory
*Resources specific to different scientific domains
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
1520c929eeaacf571f9737f211537bf49b58cf63
2231
2228
2022-02-22T14:08:43Z
Gepr
9
add news of the officer election 2022
wikitext
text/x-wiki
Consult the [//meta.wikimedia.org/wiki/Help:Contents MediaWiki User's Guide] for information on using the wiki software.
=News=
==2022-02-22: Officer Election==
Thanks to the exiting officers Matteo Morini & Jim Anderson! The new assignments are ED/President: [[User:gepr|Glen Ropella]], Vice President: Gary An, Treasurer: Ted Carmichael, Secretary: Roger Burkhart.
==2022-01-25: Director Election==
Thanks to the exiting directors Asim Zia, Jim Anderson, Pietro Terna, Ivan Garibay, Steve Railsback, and Mirsad Hadzikadic! The new board comprises: Gary An, Roger Burkhart, Ted Carmichael, Marcus Daniels, Matteo Morini, and [[User:gepr|Glen Ropella]].
===[[OldNews]]===
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for the Swarm software framework, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
=Agent- and Individual-based Modeling Resources=
'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. '''This area is no longer maintained and we refer interested people to more up-to-date sites such as [http://www.openabm.org/ www.OpenABM.org]'''
There is still information on:
*Agent-based modeling community resources
*Software (information on alternative platforms; learning materials; template models; integrated development environments)
*"How and why to do agent-based modeling": techniques and theory
*Resources specific to different scientific domains
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
06a47c3ff578547ebbdaae132b0c23295e984ea5
2228
2226
2022-01-25T12:49:28Z
Gepr
9
Added the news of the board election result
wikitext
text/x-wiki
Consult the [//meta.wikimedia.org/wiki/Help:Contents MediaWiki User's Guide] for information on using the wiki software.
=News=
==2022-01-25: Director Election==
Thanks to the exiting directors Asim Zia, Jim Anderson, Pietro Terna, Ivan Garibay, Steve Railsback, and Mirsad Hadzikadic! The new board comprises: Gary An, Roger Burkhart, Ted Carmichael, Marcus Daniels, Matteo Morini, and [[User:gepr|Glen Ropella]].
===[[OldNews]]===
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for the Swarm software framework, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
=Agent- and Individual-based Modeling Resources=
'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. '''This area is no longer maintained and we refer interested people to more up-to-date sites such as [http://www.openabm.org/ www.OpenABM.org]'''
There is still information on:
*Agent-based modeling community resources
*Software (information on alternative platforms; learning materials; template models; integrated development environments)
*"How and why to do agent-based modeling": techniques and theory
*Resources specific to different scientific domains
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
428e1845ab9a8d98697233b7ff0d220e14717c84
2226
2223
2021-11-22T19:21:49Z
Gepr
9
update to remove member info since we no longer have members
wikitext
text/x-wiki
Consult the [//meta.wikimedia.org/wiki/Help:Contents MediaWiki User's Guide] for information on using the wiki software.
=News=
==2020-09-30: Mailing lists==
[https://lists.nongnu.org/mailman/listinfo/swarm-support Swarm-Support] has been disabled for the indefinite future. We've left the Mailman page, including the archives up for spelunking. But new subscriptions and posts have been disabled.
==2020-07-10: Donation to NetLogo==
The SDG has donated $10,000 to Northwestern University's [http://ccl.northwestern.edu/ Center for Connected Learning and Computer-Based Modeling (CCL)] to support completion and distribution of the [https://github.com/NetLogo/Time-Extension NetLogo "Time" extension], which adds discrete event simulation support to [http://ccl.northwestern.edu/netlogo/ NetLogo].
==2020-06-08: Reconstituted Board of Directors==
The [[Swarm Development Group|SDG]] took a break from organizing SwarmFest. A [[SDG Directors|new board]] has been elected and is planning for the future. Please watch this space for any updates.
===[[OldNews]]===
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for the Swarm software framework, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
=Agent- and Individual-based Modeling Resources=
'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. '''This area is no longer maintained and we refer interested people to more up-to-date sites such as [http://www.openabm.org/ www.OpenABM.org]'''
There is still information on:
*Agent-based modeling community resources
*Software (information on alternative platforms; learning materials; template models; integrated development environments)
*"How and why to do agent-based modeling": techniques and theory
*Resources specific to different scientific domains
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
06d0d9b73149fd9ad7d0c41a75b486499ee34111
2223
2222
2020-09-30T19:14:19Z
Gepr
9
/* News */ Add news about disabling swarm-support.
wikitext
text/x-wiki
Consult the [//meta.wikimedia.org/wiki/Help:Contents MediaWiki User's Guide] for information on using the wiki software.
=News=
==2020-09-30: Mailing lists==
[https://lists.nongnu.org/mailman/listinfo/swarm-support Swarm-Support] has been disabled for the indefinite future. We've left the Mailman page, including the archives up for spelunking. But new subscriptions and posts have been disabled.
==2020-07-10: Donation to NetLogo==
The SDG has donated $10,000 to Northwestern University's [http://ccl.northwestern.edu/ Center for Connected Learning and Computer-Based Modeling (CCL)] to support completion and distribution of the [https://github.com/NetLogo/Time-Extension NetLogo "Time" extension], which adds discrete event simulation support to [http://ccl.northwestern.edu/netlogo/ NetLogo].
==2020-06-08: Reconstituted Board of Directors==
The [[Swarm Development Group|SDG]] took a break from organizing SwarmFest. A [[SDG Directors|new board]] has been elected and is planning for the future. Please watch this space for any updates.
===[[OldNews]]===
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for the Swarm software framework, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
=Agent- and Individual-based Modeling Resources=
'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. '''This area is no longer maintained and we refer interested people to more up-to-date sites such as [http://www.openabm.org/ www.OpenABM.org]'''
There is still information on:
*Agent-based modeling community resources
*Software (information on alternative platforms; learning materials; template models; integrated development environments)
*"How and why to do agent-based modeling": techniques and theory
*Resources specific to different scientific domains
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
*'''[[SDG_membership|Information on SDG membership]]'''
*An old list of [https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
6aa4f2088e35e1d316e37f126096057fd919903e
2222
2220
2020-07-10T21:42:40Z
Gepr
9
Added note about the netlogo donation
wikitext
text/x-wiki
Consult the [//meta.wikimedia.org/wiki/Help:Contents MediaWiki User's Guide] for information on using the wiki software.
=News=
==2020-07-10: Donation to NetLogo==
The SDG has donated $10,000 to Northwestern University's [http://ccl.northwestern.edu/ Center for Connected Learning and Computer-Based Modeling (CCL)] to support completion and distribution of the [https://github.com/NetLogo/Time-Extension NetLogo "Time" extension], which adds discrete event simulation support to [http://ccl.northwestern.edu/netlogo/ NetLogo].
==2020-06-08: Reconstituted Board of Directors==
The [[Swarm Development Group|SDG]] took a break from organizing SwarmFest. A [[SDG Directors|new board]] has been elected and is planning for the future. Please watch this space for any updates.
===[[OldNews]]===
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for the Swarm software framework, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
=Agent- and Individual-based Modeling Resources=
'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. '''This area is no longer maintained and we refer interested people to more up-to-date sites such as [http://www.openabm.org/ www.OpenABM.org]'''
There is still information on:
*Agent-based modeling community resources
*Software (information on alternative platforms; learning materials; template models; integrated development environments)
*"How and why to do agent-based modeling": techniques and theory
*Resources specific to different scientific domains
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
*'''[[SDG_membership|Information on SDG membership]]'''
*An old list of [https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
70317a145a35d0b9caaa19944292ba1b4c80905b
2220
2218
2020-06-09T00:21:16Z
Gepr
9
replaced the News section with a blurb and moved old news to new OldNews page
wikitext
text/x-wiki
Consult the [//meta.wikimedia.org/wiki/Help:Contents MediaWiki User's Guide] for information on using the wiki software.
=News=
==Reconstituted Board of Directors==
The [[Swarm Development Group|SDG]] took a break from organizing SwarmFest. A [[SDG Directors|new board]] has been elected and is planning for the future. Please watch this space for any updates.
===[[OldNews]]===
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for the Swarm software framework, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
=Agent- and Individual-based Modeling Resources=
'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. '''This area is no longer maintained and we refer interested people to more up-to-date sites such as [http://www.openabm.org/ www.OpenABM.org]'''
There is still information on:
*Agent-based modeling community resources
*Software (information on alternative platforms; learning materials; template models; integrated development environments)
*"How and why to do agent-based modeling": techniques and theory
*Resources specific to different scientific domains
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
*'''[[SDG_membership|Information on SDG membership]]'''
*An old list of [https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
2ed3dd9ab83bc921e78cfd7cd7e2f2f73a003b87
2218
2197
2020-06-09T00:10:37Z
Gepr
9
delete the "is back" blurb
wikitext
text/x-wiki
Consult the [//meta.wikimedia.org/wiki/Help:Contents MediaWiki User's Guide] for information on using the wiki software.
=News=
==Swarmfest 2016: University of Vermont, July 31 – August 3==
Swamfest is the annual meeting of the Swarm Development Group (SDG), and one of the oldest communities involved in the development and propagation of agent-based modeling. Swarmfest has traditionally involved a mix of both tool-users and tool-developers, drawn from many domains of expertise. These have included, in the past, computer scientists, software engineers, biomedical researchers, ecologists, economists, political scientists, social scientists, resource management specialists and evolutionary biologists. Swarmfest represents a low-key environment for researchers to explore new ideas and approaches, and benefit from a multi-disciplinary environment.
SwarmFest 2016 will be at the University of Vermont in Burlington, Vermont, USA. Abstracts are now being accepted. For information [http://www.swarmfest2016.org/ click here.]
==New version of Objective-C Swarm for Windows==
There is a new binary (and source) release of Swarm that works with MinGW, a compiler that produces Windows executables. Advantages of this new way to use Swarm in Windows:
* Windows executables can be launched directly from Windows, without needing to launch from inside a Unix-like environment.
* Swarm models can be distributed for use on any Windows computer, without requiring Swarm or MinGW to be installed.
* Faster execution than Cygwin Swarm.
See [[Swarm_and_MinGW]]
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for the Swarm software framework, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
=Agent- and Individual-based Modeling Resources=
'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. '''This area is no longer maintained and we refer interested people to more up-to-date sites such as [http://www.openabm.org/ www.OpenABM.org]'''
There is still information on:
*Agent-based modeling community resources
*Software (information on alternative platforms; learning materials; template models; integrated development environments)
*"How and why to do agent-based modeling": techniques and theory
*Resources specific to different scientific domains
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
*'''[[SDG_membership|Information on SDG membership]]'''
*An old list of [https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
0e7ac4ab534f1e676e8b435c7e743beec223a1bb
2197
2188
2016-06-06T23:09:39Z
SRogers
8
wikitext
text/x-wiki
Consult the [//meta.wikimedia.org/wiki/Help:Contents MediaWiki User's Guide] for information on using the wiki software.
=WWW.SWARM.ORG is back!=
We have restored the Swarm Development Group wiki following a major server crash several years ago. The wiki's emphasis is now on supporting Swarm software and SDG's annual SwarmFest. We will no longer attempt to provide current information on agent-based modeling in general, or on modeling software other than Swarm.
=News=
==Swarmfest 2016: University of Vermont, July 31 – August 3==
Swamfest is the annual meeting of the Swarm Development Group (SDG), and one of the oldest communities involved in the development and propagation of agent-based modeling. Swarmfest has traditionally involved a mix of both tool-users and tool-developers, drawn from many domains of expertise. These have included, in the past, computer scientists, software engineers, biomedical researchers, ecologists, economists, political scientists, social scientists, resource management specialists and evolutionary biologists. Swarmfest represents a low-key environment for researchers to explore new ideas and approaches, and benefit from a multi-disciplinary environment.
SwarmFest 2016 will be at the University of Vermont in Burlington, Vermont, USA. Abstracts are now being accepted. For information [http://www.swarmfest2016.org/ click here.]
==New version of Objective-C Swarm for Windows==
There is a new binary (and source) release of Swarm that works with MinGW, a compiler that produces Windows executables. Advantages of this new way to use Swarm in Windows:
* Windows executables can be launched directly from Windows, without needing to launch from inside a Unix-like environment.
* Swarm models can be distributed for use on any Windows computer, without requiring Swarm or MinGW to be installed.
* Faster execution than Cygwin Swarm.
See [[Swarm_and_MinGW]]
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for the Swarm software framework, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
=Agent- and Individual-based Modeling Resources=
'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. '''This area is no longer maintained and we refer interested people to more up-to-date sites such as [http://www.openabm.org/ www.OpenABM.org]'''
There is still information on:
*Agent-based modeling community resources
*Software (information on alternative platforms; learning materials; template models; integrated development environments)
*"How and why to do agent-based modeling": techniques and theory
*Resources specific to different scientific domains
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
*'''[[SDG_membership|Information on SDG membership]]'''
*An old list of [https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
6cc95db54c8a1739b1d135c140b9dac4c555d300
2188
2187
2016-06-06T16:04:50Z
SRogers
8
/* Swarm Software for Agent-based Modeling */
wikitext
text/x-wiki
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
=WWW.SWARM.ORG is back!=
We have restored the Swarm Development Group wiki following a major server crash several years ago. The wiki's emphasis is now on supporting Swarm software and SDG's annual SwarmFest. We will no longer attempt to provide current information on agent-based modeling in general, or on modeling software other than Swarm.
=News=
==Swarmfest 2016: University of Vermont, July 31 – August 3==
Swamfest is the annual meeting of the Swarm Development Group (SDG), and one of the oldest communities involved in the development and propagation of agent-based modeling. Swarmfest has traditionally involved a mix of both tool-users and tool-developers, drawn from many domains of expertise. These have included, in the past, computer scientists, software engineers, biomedical researchers, ecologists, economists, political scientists, social scientists, resource management specialists and evolutionary biologists. Swarmfest represents a low-key environment for researchers to explore new ideas and approaches, and benefit from a multi-disciplinary environment.
SwarmFest 2016 will be at the University of Vermont in Burlington, Vermont, USA. Abstracts are now being accepted. For information [http://www.swarmfest2016.org/ click here.]
==New version of Objective-C Swarm for Windows==
There is a new binary (and source) release of Swarm that works with MinGW, a compiler that produces Windows executables. Advantages of this new way to use Swarm in Windows:
* Windows executables can be launched directly from Windows, without needing to launch from inside a Unix-like environment.
* Swarm models can be distributed for use on any Windows computer, without requiring Swarm or MinGW to be installed.
* Faster execution than Cygwin Swarm.
See [[Swarm_and_MinGW]]
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for the Swarm software framework, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
=Agent- and Individual-based Modeling Resources=
'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. '''This area is no longer maintained and we refer interested people to more up-to-date sites such as [http://www.openabm.org/ www.OpenABM.org]'''
There is still information on:
*Agent-based modeling community resources
*Software (information on alternative platforms; learning materials; template models; integrated development environments)
*"How and why to do agent-based modeling": techniques and theory
*Resources specific to different scientific domains
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
*'''[[SDG_membership|Information on SDG membership]]'''
*An old list of [https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
c4dba4adc3d646751aa1f5953ac3ae3f4740bc13
2187
2186
2016-05-16T16:47:37Z
SwarmWikiSysop
5
/* WWW.SWARM.ORG is back! */
wikitext
text/x-wiki
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
=WWW.SWARM.ORG is back!=
We have restored the Swarm Development Group wiki following a major server crash several years ago. The wiki's emphasis is now on supporting Swarm software and SDG's annual SwarmFest. We will no longer attempt to provide current information on agent-based modeling in general, or on modeling software other than Swarm.
=News=
==Swarmfest 2016: University of Vermont, July 31 – August 3==
Swamfest is the annual meeting of the Swarm Development Group (SDG), and one of the oldest communities involved in the development and propagation of agent-based modeling. Swarmfest has traditionally involved a mix of both tool-users and tool-developers, drawn from many domains of expertise. These have included, in the past, computer scientists, software engineers, biomedical researchers, ecologists, economists, political scientists, social scientists, resource management specialists and evolutionary biologists. Swarmfest represents a low-key environment for researchers to explore new ideas and approaches, and benefit from a multi-disciplinary environment.
SwarmFest 2016 will be at the University of Vermont in Burlington, Vermont, USA. Abstracts are now being accepted. For information [http://www.swarmfest2016.org/ click here.]
==New version of Objective-C Swarm for Windows==
There is a new binary (and source) release of Swarm that works with MinGW, a compiler that produces Windows executables. Advantages of this new way to use Swarm in Windows:
* Windows executables can be launched directly from Windows, without needing to launch from inside a Unix-like environment.
* Swarm models can be distributed for use on any Windows computer, without requiring Swarm or MinGW to be installed.
* Faster execution than Cygwin Swarm.
See [[Swarm_and_MinGW]]
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for Swarm software, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
=Agent- and Individual-based Modeling Resources=
'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. '''This area is no longer maintained and we refer interested people to more up-to-date sites such as [http://www.openabm.org/ www.OpenABM.org]'''
There is still information on:
*Agent-based modeling community resources
*Software (information on alternative platforms; learning materials; template models; integrated development environments)
*"How and why to do agent-based modeling": techniques and theory
*Resources specific to different scientific domains
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
*'''[[SDG_membership|Information on SDG membership]]'''
*An old list of [https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
1f5f03da103b5df3210099e0cb492a0c59ce5e44
2186
2153
2016-05-16T16:45:54Z
SwarmWikiSysop
5
/* News */
wikitext
text/x-wiki
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
=WWW.SWARM.ORG is back!=
We have just restored the Swarm Development Group wiki (October 2015), following a major server crash several years ago. We will be gradually cleaning up the site. Its emphasis will be on supporting Swarm software and SDG's annual SwarmFest. We will no longer attempt to provide current information on agent-based modeling in general, or on modeling software other than Swarm.
=News=
==Swarmfest 2016: University of Vermont, July 31 – August 3==
Swamfest is the annual meeting of the Swarm Development Group (SDG), and one of the oldest communities involved in the development and propagation of agent-based modeling. Swarmfest has traditionally involved a mix of both tool-users and tool-developers, drawn from many domains of expertise. These have included, in the past, computer scientists, software engineers, biomedical researchers, ecologists, economists, political scientists, social scientists, resource management specialists and evolutionary biologists. Swarmfest represents a low-key environment for researchers to explore new ideas and approaches, and benefit from a multi-disciplinary environment.
SwarmFest 2016 will be at the University of Vermont in Burlington, Vermont, USA. Abstracts are now being accepted. For information [http://www.swarmfest2016.org/ click here.]
==New version of Objective-C Swarm for Windows==
There is a new binary (and source) release of Swarm that works with MinGW, a compiler that produces Windows executables. Advantages of this new way to use Swarm in Windows:
* Windows executables can be launched directly from Windows, without needing to launch from inside a Unix-like environment.
* Swarm models can be distributed for use on any Windows computer, without requiring Swarm or MinGW to be installed.
* Faster execution than Cygwin Swarm.
See [[Swarm_and_MinGW]]
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for Swarm software, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
=Agent- and Individual-based Modeling Resources=
'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. '''This area is no longer maintained and we refer interested people to more up-to-date sites such as [http://www.openabm.org/ www.OpenABM.org]'''
There is still information on:
*Agent-based modeling community resources
*Software (information on alternative platforms; learning materials; template models; integrated development environments)
*"How and why to do agent-based modeling": techniques and theory
*Resources specific to different scientific domains
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
*'''[[SDG_membership|Information on SDG membership]]'''
*An old list of [https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
c3ef206ea7f9101b907f558d2c143934011f83e8
2153
2152
2015-11-30T23:04:06Z
SwarmWikiSysop
5
/* Help */
wikitext
text/x-wiki
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
=WWW.SWARM.ORG is back!=
We have just restored the Swarm Development Group wiki (October 2015), following a major server crash several years ago. We will be gradually cleaning up the site. Its emphasis will be on supporting Swarm software and SDG's annual SwarmFest. We will no longer attempt to provide current information on agent-based modeling in general, or on modeling software other than Swarm.
=News=
==Swarmfest==
Swamfest is the annual meeting of the Swarm Development Group (SDG), and one of the oldest communities involved in the development and propagation of agent-based modeling. Swarmfest has traditionally involved a mix of both tool-users and tool-developers, drawn from many domains of expertise. These have included, in the past, computer scientists, software engineers, biomedical researchers, ecologists, economists, political scientists, social scientists, resource management specialists and evolutionary biologists. Swarmfest represents a low-key environment for researchers to explore new ideas and approaches, and benefit from a multi-disciplinary environment.
SwarmFest 2015 was held at the University of South Carolina in Columbia, South Carolina, USA. For information [http://www.swarmfest2015.org/ click here.]
Announcements for future fests should appear here.
==New version of Objective-C Swarm for Windows==
There is a new binary (and source) release of Swarm that works with MinGW, a compiler that produces Windows executables. Advantages of this new way to use Swarm in Windows:
* Windows executables can be launched directly from Windows, without needing to launch from inside a Unix-like environment.
* Swarm models can be distributed for use on any Windows computer, without requiring Swarm or MinGW to be installed.
* Faster execution than Cygwin Swarm.
See [[Swarm_and_MinGW]]
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for Swarm software, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
=Agent- and Individual-based Modeling Resources=
'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. '''This area is no longer maintained and we refer interested people to more up-to-date sites such as [http://www.openabm.org/ www.OpenABM.org]'''
There is still information on:
*Agent-based modeling community resources
*Software (information on alternative platforms; learning materials; template models; integrated development environments)
*"How and why to do agent-based modeling": techniques and theory
*Resources specific to different scientific domains
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
*'''[[SDG_membership|Information on SDG membership]]'''
*An old list of [https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
fa65adfd6f44c399a77ff504852b8cde7abaef85
2152
2151
2015-11-30T23:03:35Z
SwarmWikiSysop
5
/* Swarm Development Group */
wikitext
text/x-wiki
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
=WWW.SWARM.ORG is back!=
We have just restored the Swarm Development Group wiki (October 2015), following a major server crash several years ago. We will be gradually cleaning up the site. Its emphasis will be on supporting Swarm software and SDG's annual SwarmFest. We will no longer attempt to provide current information on agent-based modeling in general, or on modeling software other than Swarm.
=News=
==Swarmfest==
Swamfest is the annual meeting of the Swarm Development Group (SDG), and one of the oldest communities involved in the development and propagation of agent-based modeling. Swarmfest has traditionally involved a mix of both tool-users and tool-developers, drawn from many domains of expertise. These have included, in the past, computer scientists, software engineers, biomedical researchers, ecologists, economists, political scientists, social scientists, resource management specialists and evolutionary biologists. Swarmfest represents a low-key environment for researchers to explore new ideas and approaches, and benefit from a multi-disciplinary environment.
SwarmFest 2015 was held at the University of South Carolina in Columbia, South Carolina, USA. For information [http://www.swarmfest2015.org/ click here.]
Announcements for future fests should appear here.
==New version of Objective-C Swarm for Windows==
There is a new binary (and source) release of Swarm that works with MinGW, a compiler that produces Windows executables. Advantages of this new way to use Swarm in Windows:
* Windows executables can be launched directly from Windows, without needing to launch from inside a Unix-like environment.
* Swarm models can be distributed for use on any Windows computer, without requiring Swarm or MinGW to be installed.
* Faster execution than Cygwin Swarm.
See [[Swarm_and_MinGW]]
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for Swarm software, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
=Agent- and Individual-based Modeling Resources=
'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. '''This area is no longer maintained and we refer interested people to more up-to-date sites such as [http://www.openabm.org/ www.OpenABM.org]'''
There is still information on:
*Agent-based modeling community resources
*Software (information on alternative platforms; learning materials; template models; integrated development environments)
*"How and why to do agent-based modeling": techniques and theory
*Resources specific to different scientific domains
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
*'''[[SDG_membership|Information on SDG membership]]'''
*An old list of [https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
|}
fb208116ae929548b9de5228f0864f0692452646
2151
2149
2015-11-30T23:02:43Z
SwarmWikiSysop
5
wikitext
text/x-wiki
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
=WWW.SWARM.ORG is back!=
We have just restored the Swarm Development Group wiki (October 2015), following a major server crash several years ago. We will be gradually cleaning up the site. Its emphasis will be on supporting Swarm software and SDG's annual SwarmFest. We will no longer attempt to provide current information on agent-based modeling in general, or on modeling software other than Swarm.
=News=
==Swarmfest==
Swamfest is the annual meeting of the Swarm Development Group (SDG), and one of the oldest communities involved in the development and propagation of agent-based modeling. Swarmfest has traditionally involved a mix of both tool-users and tool-developers, drawn from many domains of expertise. These have included, in the past, computer scientists, software engineers, biomedical researchers, ecologists, economists, political scientists, social scientists, resource management specialists and evolutionary biologists. Swarmfest represents a low-key environment for researchers to explore new ideas and approaches, and benefit from a multi-disciplinary environment.
SwarmFest 2015 was held at the University of South Carolina in Columbia, South Carolina, USA. For information [http://www.swarmfest2015.org/ click here.]
Announcements for future fests should appear here.
==New version of Objective-C Swarm for Windows==
There is a new binary (and source) release of Swarm that works with MinGW, a compiler that produces Windows executables. Advantages of this new way to use Swarm in Windows:
* Windows executables can be launched directly from Windows, without needing to launch from inside a Unix-like environment.
* Swarm models can be distributed for use on any Windows computer, without requiring Swarm or MinGW to be installed.
* Faster execution than Cygwin Swarm.
See [[Swarm_and_MinGW]]
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for Swarm software, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
=Agent- and Individual-based Modeling Resources=
'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. '''This area is no longer maintained and we refer interested people to more up-to-date sites such as [http://www.openabm.org/ www.OpenABM.org]'''
There is still information on:
*Agent-based modeling community resources
*Software (information on alternative platforms; learning materials; template models; integrated development environments)
*"How and why to do agent-based modeling": techniques and theory
*Resources specific to different scientific domains
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
*'''[[SDG_membership|Information on SDG membership]]'''
*[https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]
|-
| colspan=2 style="border: 1px solid #c6c9ff; color: #000; padding: .4em .9em .9em; background-color: #d3d3d3" |
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
|}
31d17852d48c6edc3893fa33b3a35b230219009a
2149
2148
2015-11-30T22:49:54Z
SwarmWikiSysop
5
/* Be a Swarm Development Group Member! */
wikitext
text/x-wiki
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
=WWW.SWARM.ORG is back!=
We have just restored the Swarm Development Group wiki (October 2015), following a major server crash several years ago. We will be gradually cleaning up the site. Its emphasis will be on supporting Swarm software and SDG's annual SwarmFest. We will no longer attempt to provide current information on agent-based modeling in general, or on modeling software other than Swarm.
=News=
==Swarmfest==
Swamfest is the annual meeting of the Swarm Development Group (SDG), and one of the oldest communities involved in the development and propagation of agent-based modeling. Swarmfest has traditionally involved a mix of both tool-users and tool-developers, drawn from many domains of expertise. These have included, in the past, computer scientists, software engineers, biomedical researchers, ecologists, economists, political scientists, social scientists, resource management specialists and evolutionary biologists. Swarmfest represents a low-key environment for researchers to explore new ideas and approaches, and benefit from a multi-disciplinary environment.
SwarmFest 2015 was held at the University of South Carolina in Columbia, South Carolina, USA. For information [http://www.swarmfest2015.org/ click here.]
Announcements for future fests should appear here.
=New version of Objective-C Swarm for Windows=
There is a new binary (and source) release of Swarm that works with MinGW, a compiler that produces Windows executables. Advantages of this new way to use Swarm in Windows:
* Windows executables can be launched directly from Windows, without needing to launch from inside a Unix-like environment.
* Swarm models can be distributed for use on any Windows computer, without requiring Swarm or MinGW to be installed.
* Faster execution than Cygwin Swarm.
See [[Swarm_and_MinGW]]
=Agent- and Individual-based Modeling Resources=
*'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. There are sub-areas for:
**Agent-based modeling community resources, including [[Swarm:_SwarmFest|SwarmFest]], our annual modeling conference
**Software (information on alternative platforms; learning materials; template models; integrated development environments)
**"How and why to do agent-based modeling": techniques and theory
**Resources specific to different scientific domains
*'''modelling@swarm.org: The email community of agent-based modelers.''' This email list discusses topics of general interest to agent-based modelers. [[Swarm:_Mailing_lists|More information and signup here.]]'''
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #FFFFCC" |
[[Image:Small-swarm-logo.jpeg]]
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for Swarm software, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm: applications|Thanks to Paul Johnson, a new package of applications for Swarm-2.2]]'', particularly for Objective C
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
=Some Mostly Obsolete Links in this Wiki:=
[[ABM_Resources]]
[[Swarm_Apps]]
[[Swarm_FAQ]]
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #DAFDDA" |
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
*'''[[SDG_membership|Information on SDG membership]]'''
*[https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]
|-
| colspan=2 style="border: 1px solid #c6c9ff; color: #000; padding: .4em .9em .9em; background-color: #d3d3d3" |
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
|}
4bf080e96e1307cef011e599fbb2710941b5947b
2148
2147
2015-11-30T22:49:18Z
SwarmWikiSysop
5
/* Swarmfest */
wikitext
text/x-wiki
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
=WWW.SWARM.ORG is back!=
We have just restored the Swarm Development Group wiki (October 2015), following a major server crash several years ago. We will be gradually cleaning up the site. Its emphasis will be on supporting Swarm software and SDG's annual SwarmFest. We will no longer attempt to provide current information on agent-based modeling in general, or on modeling software other than Swarm.
=News=
==Swarmfest==
Swamfest is the annual meeting of the Swarm Development Group (SDG), and one of the oldest communities involved in the development and propagation of agent-based modeling. Swarmfest has traditionally involved a mix of both tool-users and tool-developers, drawn from many domains of expertise. These have included, in the past, computer scientists, software engineers, biomedical researchers, ecologists, economists, political scientists, social scientists, resource management specialists and evolutionary biologists. Swarmfest represents a low-key environment for researchers to explore new ideas and approaches, and benefit from a multi-disciplinary environment.
SwarmFest 2015 was held at the University of South Carolina in Columbia, South Carolina, USA. For information [http://www.swarmfest2015.org/ click here.]
Announcements for future fests should appear here.
=New version of Objective-C Swarm for Windows=
There is a new binary (and source) release of Swarm that works with MinGW, a compiler that produces Windows executables. Advantages of this new way to use Swarm in Windows:
* Windows executables can be launched directly from Windows, without needing to launch from inside a Unix-like environment.
* Swarm models can be distributed for use on any Windows computer, without requiring Swarm or MinGW to be installed.
* Faster execution than Cygwin Swarm.
See [[Swarm_and_MinGW]]
=Be a Swarm Development Group Member!=
Membership in SDG is a way to support our efforts to maintain and improve Swarm, and to support agent-based modeling. [[SDG_membership|We just updated our membership page]] with new membership categories and procedures. Take a look to see what you can do. {{posted|--[[User:SFRailsback|SFRailsback]] 17:34, 10 Nov 2006 (EST)}}
<div style="float:right;">'''[[News|News archive]]<br>
[[SwarmWiki:FAQ#Q._How_do_I_add_a_news_item_to_the_wiki.27s_main_page.3F|How to submit a news item]]'''</div>
| width="45%" style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #ffebcd" |
=Agent- and Individual-based Modeling Resources=
*'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. There are sub-areas for:
**Agent-based modeling community resources, including [[Swarm:_SwarmFest|SwarmFest]], our annual modeling conference
**Software (information on alternative platforms; learning materials; template models; integrated development environments)
**"How and why to do agent-based modeling": techniques and theory
**Resources specific to different scientific domains
*'''modelling@swarm.org: The email community of agent-based modelers.''' This email list discusses topics of general interest to agent-based modelers. [[Swarm:_Mailing_lists|More information and signup here.]]'''
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #FFFFCC" |
[[Image:Small-swarm-logo.jpeg]]
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for Swarm software, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm: applications|Thanks to Paul Johnson, a new package of applications for Swarm-2.2]]'', particularly for Objective C
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
=Some Mostly Obsolete Links in this Wiki:=
[[ABM_Resources]]
[[Swarm_Apps]]
[[Swarm_FAQ]]
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #DAFDDA" |
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
*'''[[SDG_membership|Information on SDG membership]]'''
*[https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]
|-
| colspan=2 style="border: 1px solid #c6c9ff; color: #000; padding: .4em .9em .9em; background-color: #d3d3d3" |
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
|}
a3a9ca6edee259ce3025f858bed4cacff7d89ed9
2147
2146
2015-11-30T22:45:58Z
SwarmWikiSysop
5
Generic information about SwarmFest.
wikitext
text/x-wiki
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
=WWW.SWARM.ORG is back!=
We have just restored the Swarm Development Group wiki (October 2015), following a major server crash several years ago. We will be gradually cleaning up the site. Its emphasis will be on supporting Swarm software and SDG's annual SwarmFest. We will no longer attempt to provide current information on agent-based modeling in general, or on modeling software other than Swarm.
=News=
==Swarmfest==
Swamfest is the annual meeting of the Swarm Development Group (SDG), and one of the oldest communities involved in the development and propagation of agent-based modeling. Swarmfest has traditionally involved a mix of both tool-users and tool-developers, drawn from many domains of expertise. These have included, in the past, computer scientists, software engineers, biomedical researchers, ecologists, economists, political scientists, social scientists, resource management specialists and evolutionary biologists. Swarmfest represents a low-key environment for researchers to explore new ideas and approaches, and benefit from a multi-disciplinary environment.
SwarmFest 2015 was held at the University of South Carolina in Columbia, South Carolina, USA. For information see: [[http://www.swarmfest2015.org/]]
Announcements for future fests should appear here.
=New version of Objective-C Swarm for Windows=
There is a new binary (and source) release of Swarm that works with MinGW, a compiler that produces Windows executables. Advantages of this new way to use Swarm in Windows:
* Windows executables can be launched directly from Windows, without needing to launch from inside a Unix-like environment.
* Swarm models can be distributed for use on any Windows computer, without requiring Swarm or MinGW to be installed.
* Faster execution than Cygwin Swarm.
See [[Swarm_and_MinGW]]
=Be a Swarm Development Group Member!=
Membership in SDG is a way to support our efforts to maintain and improve Swarm, and to support agent-based modeling. [[SDG_membership|We just updated our membership page]] with new membership categories and procedures. Take a look to see what you can do. {{posted|--[[User:SFRailsback|SFRailsback]] 17:34, 10 Nov 2006 (EST)}}
<div style="float:right;">'''[[News|News archive]]<br>
[[SwarmWiki:FAQ#Q._How_do_I_add_a_news_item_to_the_wiki.27s_main_page.3F|How to submit a news item]]'''</div>
| width="45%" style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #ffebcd" |
=Agent- and Individual-based Modeling Resources=
*'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. There are sub-areas for:
**Agent-based modeling community resources, including [[Swarm:_SwarmFest|SwarmFest]], our annual modeling conference
**Software (information on alternative platforms; learning materials; template models; integrated development environments)
**"How and why to do agent-based modeling": techniques and theory
**Resources specific to different scientific domains
*'''modelling@swarm.org: The email community of agent-based modelers.''' This email list discusses topics of general interest to agent-based modelers. [[Swarm:_Mailing_lists|More information and signup here.]]'''
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #FFFFCC" |
[[Image:Small-swarm-logo.jpeg]]
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for Swarm software, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm: applications|Thanks to Paul Johnson, a new package of applications for Swarm-2.2]]'', particularly for Objective C
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
=Some Mostly Obsolete Links in this Wiki:=
[[ABM_Resources]]
[[Swarm_Apps]]
[[Swarm_FAQ]]
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #DAFDDA" |
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
*'''[[SDG_membership|Information on SDG membership]]'''
*[https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]
|-
| colspan=2 style="border: 1px solid #c6c9ff; color: #000; padding: .4em .9em .9em; background-color: #d3d3d3" |
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
|}
0790aaf08cf24381a8aa1d3053650ded4fc3a559
2146
2145
2015-11-30T22:38:40Z
SwarmWikiSysop
5
/* WWW.SWARM.ORG is back! */
wikitext
text/x-wiki
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
=WWW.SWARM.ORG is back!=
We have just restored the Swarm Development Group wiki (October 2015), following a major server crash several years ago. We will be gradually cleaning up the site. Its emphasis will be on supporting Swarm software and SDG's annual SwarmFest. We will no longer attempt to provide current information on agent-based modeling in general, or on modeling software other than Swarm.
=News=
==Announcement for Swarmfest 2012==
Email Inquiries to: swarmfest2012@gmail.com
[[Test]] will take place in Downtown Charlotte, N.C. July 29-31, 2012, hosted by the Complex Systems
Institute at the University of North Carolina, Charlotte (http://complexity.uncc.edu/). The conference venue is the UNCC Center City Building http://centercity.uncc.edu/.
Local Map http://centercity.uncc.edu/map-and-directions and Parking http://centercity.uncc.edu/parking
'''Registration can be accomplished at http://www.cvent.com/d/tcqqgn'''
Swamfest is the annual meeting of the Swarm Development Group (SDG), and one of the oldest communities involved in the development and propagation of agent-based modeling. Swarmfest has traditionally involved a mix of both tool-users and tool-developers, drawn from many domains of expertise. These have included, in the past, computer scientists, software engineers, biomedical researchers, ecologists, economists, political scientists, social scientists, resource management specialists and evolutionary biologists. Swarmfest represents a low-key environment for researchers to explore new ideas and approaches, and benefit from a multi-disciplinary environment.
This year we will continue to examine the range of systems being modeled with ABM, with the possibility of providing some guidance as to the suitability of the various types of agent-based models for particular types of modeling goals. We also encourage the sharing of our experiences with attempting to gain acceptance of ABM within our own research communities, and discuss strategies where cross-domain examples/analogies can aid in that process. We will also try to identify future avenues for ABM research, including the "next" generation of ABM tools, platforms and application.
Watch this page for upcoming news on program and logistics.
Hope to see you in Charlotte!
{{posted|--[[User:Gary An|Gary An]] 16 March 2012}}
=New version of Objective-C Swarm for Windows=
There is a new binary (and source) release of Swarm that works with MinGW, a compiler that produces Windows executables. Advantages of this new way to use Swarm in Windows:
* Windows executables can be launched directly from Windows, without needing to launch from inside a Unix-like environment.
* Swarm models can be distributed for use on any Windows computer, without requiring Swarm or MinGW to be installed.
* Faster execution than Cygwin Swarm.
See [[Swarm_and_MinGW]]
=Be a Swarm Development Group Member!=
Membership in SDG is a way to support our efforts to maintain and improve Swarm, and to support agent-based modeling. [[SDG_membership|We just updated our membership page]] with new membership categories and procedures. Take a look to see what you can do. {{posted|--[[User:SFRailsback|SFRailsback]] 17:34, 10 Nov 2006 (EST)}}
<div style="float:right;">'''[[News|News archive]]<br>
[[SwarmWiki:FAQ#Q._How_do_I_add_a_news_item_to_the_wiki.27s_main_page.3F|How to submit a news item]]'''</div>
| width="45%" style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #ffebcd" |
=Agent- and Individual-based Modeling Resources=
*'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. There are sub-areas for:
**Agent-based modeling community resources, including [[Swarm:_SwarmFest|SwarmFest]], our annual modeling conference
**Software (information on alternative platforms; learning materials; template models; integrated development environments)
**"How and why to do agent-based modeling": techniques and theory
**Resources specific to different scientific domains
*'''modelling@swarm.org: The email community of agent-based modelers.''' This email list discusses topics of general interest to agent-based modelers. [[Swarm:_Mailing_lists|More information and signup here.]]'''
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #FFFFCC" |
[[Image:Small-swarm-logo.jpeg]]
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for Swarm software, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm: applications|Thanks to Paul Johnson, a new package of applications for Swarm-2.2]]'', particularly for Objective C
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
=Some Mostly Obsolete Links in this Wiki:=
[[ABM_Resources]]
[[Swarm_Apps]]
[[Swarm_FAQ]]
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #DAFDDA" |
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
*'''[[SDG_membership|Information on SDG membership]]'''
*[https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]
|-
| colspan=2 style="border: 1px solid #c6c9ff; color: #000; padding: .4em .9em .9em; background-color: #d3d3d3" |
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
|}
1e1779dfdd8b3c9a706298388e23fd7f4f8812cd
2145
2144
2015-11-30T22:37:14Z
SwarmWikiSysop
5
wikitext
text/x-wiki
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
=WWW.SWARM.ORG is back!=
We have just restored the Swarm Development Group wiki (October 2015), following a major server crash several years ago. We will be gradually cleaning up the site. Its emphasis will be on supporting Swarm software and SDG's annual SwarmFest.
=News=
==Announcement for Swarmfest 2012==
Email Inquiries to: swarmfest2012@gmail.com
[[Test]] will take place in Downtown Charlotte, N.C. July 29-31, 2012, hosted by the Complex Systems
Institute at the University of North Carolina, Charlotte (http://complexity.uncc.edu/). The conference venue is the UNCC Center City Building http://centercity.uncc.edu/.
Local Map http://centercity.uncc.edu/map-and-directions and Parking http://centercity.uncc.edu/parking
'''Registration can be accomplished at http://www.cvent.com/d/tcqqgn'''
Swamfest is the annual meeting of the Swarm Development Group (SDG), and one of the oldest communities involved in the development and propagation of agent-based modeling. Swarmfest has traditionally involved a mix of both tool-users and tool-developers, drawn from many domains of expertise. These have included, in the past, computer scientists, software engineers, biomedical researchers, ecologists, economists, political scientists, social scientists, resource management specialists and evolutionary biologists. Swarmfest represents a low-key environment for researchers to explore new ideas and approaches, and benefit from a multi-disciplinary environment.
This year we will continue to examine the range of systems being modeled with ABM, with the possibility of providing some guidance as to the suitability of the various types of agent-based models for particular types of modeling goals. We also encourage the sharing of our experiences with attempting to gain acceptance of ABM within our own research communities, and discuss strategies where cross-domain examples/analogies can aid in that process. We will also try to identify future avenues for ABM research, including the "next" generation of ABM tools, platforms and application.
Watch this page for upcoming news on program and logistics.
Hope to see you in Charlotte!
{{posted|--[[User:Gary An|Gary An]] 16 March 2012}}
=New version of Objective-C Swarm for Windows=
There is a new binary (and source) release of Swarm that works with MinGW, a compiler that produces Windows executables. Advantages of this new way to use Swarm in Windows:
* Windows executables can be launched directly from Windows, without needing to launch from inside a Unix-like environment.
* Swarm models can be distributed for use on any Windows computer, without requiring Swarm or MinGW to be installed.
* Faster execution than Cygwin Swarm.
See [[Swarm_and_MinGW]]
=Be a Swarm Development Group Member!=
Membership in SDG is a way to support our efforts to maintain and improve Swarm, and to support agent-based modeling. [[SDG_membership|We just updated our membership page]] with new membership categories and procedures. Take a look to see what you can do. {{posted|--[[User:SFRailsback|SFRailsback]] 17:34, 10 Nov 2006 (EST)}}
<div style="float:right;">'''[[News|News archive]]<br>
[[SwarmWiki:FAQ#Q._How_do_I_add_a_news_item_to_the_wiki.27s_main_page.3F|How to submit a news item]]'''</div>
| width="45%" style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #ffebcd" |
=Agent- and Individual-based Modeling Resources=
*'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. There are sub-areas for:
**Agent-based modeling community resources, including [[Swarm:_SwarmFest|SwarmFest]], our annual modeling conference
**Software (information on alternative platforms; learning materials; template models; integrated development environments)
**"How and why to do agent-based modeling": techniques and theory
**Resources specific to different scientific domains
*'''modelling@swarm.org: The email community of agent-based modelers.''' This email list discusses topics of general interest to agent-based modelers. [[Swarm:_Mailing_lists|More information and signup here.]]'''
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #FFFFCC" |
[[Image:Small-swarm-logo.jpeg]]
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for Swarm software, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm: applications|Thanks to Paul Johnson, a new package of applications for Swarm-2.2]]'', particularly for Objective C
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
=Some Mostly Obsolete Links in this Wiki:=
[[ABM_Resources]]
[[Swarm_Apps]]
[[Swarm_FAQ]]
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #DAFDDA" |
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
*'''[[SDG_membership|Information on SDG membership]]'''
*[https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]
|-
| colspan=2 style="border: 1px solid #c6c9ff; color: #000; padding: .4em .9em .9em; background-color: #d3d3d3" |
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
|}
7a531915fa263bdec5680e41c3b1b3c15e708909
2144
34
2015-11-06T04:14:10Z
75.111.45.38
0
/* Getting started */
wikitext
text/x-wiki
[[Swarm_and_MinGW]]
[[ABM_Resources]]
[[Swarm_Apps]]
[[Swarm_FAQ]]
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
=WWW.SWARM.ORG is back!=
We have just restored the Swarm Development Group wiki (October 2015), following a major server crash several years ago. We will be gradually cleaning up the site. Its emphasis will be on supporting Swarm software and SDG's annual SwarmFest.
=News=
==Announcement for Swarmfest 2012==
Email Inquiries to: swarmfest2012@gmail.com
[[Test]] will take place in Downtown Charlotte, N.C. July 29-31, 2012, hosted by the Complex Systems
Institute at the University of North Carolina, Charlotte (http://complexity.uncc.edu/). The conference venue is the UNCC Center City Building http://centercity.uncc.edu/.
Local Map http://centercity.uncc.edu/map-and-directions and Parking http://centercity.uncc.edu/parking
'''Registration can be accomplished at http://www.cvent.com/d/tcqqgn'''
Swamfest is the annual meeting of the Swarm Development Group (SDG), and one of the oldest communities involved in the development and propagation of agent-based modeling. Swarmfest has traditionally involved a mix of both tool-users and tool-developers, drawn from many domains of expertise. These have included, in the past, computer scientists, software engineers, biomedical researchers, ecologists, economists, political scientists, social scientists, resource management specialists and evolutionary biologists. Swarmfest represents a low-key environment for researchers to explore new ideas and approaches, and benefit from a multi-disciplinary environment.
This year we will continue to examine the range of systems being modeled with ABM, with the possibility of providing some guidance as to the suitability of the various types of agent-based models for particular types of modeling goals. We also encourage the sharing of our experiences with attempting to gain acceptance of ABM within our own research communities, and discuss strategies where cross-domain examples/analogies can aid in that process. We will also try to identify future avenues for ABM research, including the "next" generation of ABM tools, platforms and application.
Watch this page for upcoming news on program and logistics.
Hope to see you in Charlotte!
{{posted|--[[User:Gary An|Gary An]] 16 March 2012}}
=New version of Objective-C Swarm for Windows=
There is a new binary (and source) release of Swarm that works with MinGW, a compiler that produces Windows executables. Advantages of this new way to use Swarm in Windows:
* Windows executables can be launched directly from Windows, without needing to launch from inside a Unix-like environment.
* Swarm models can be distributed for use on any Windows computer, without requiring Swarm or MinGW to be installed.
* Faster execution than Cygwin Swarm.
See the yellow "Swarm Software" box on this page.
{{posted|--[[User:SFRailsback|SFRailsback]] 15 Aug 2011}}
=Be a Swarm Development Group Member!=
Membership in SDG is a way to support our efforts to maintain and improve Swarm, and to support agent-based modeling. [[SDG_membership|We just updated our membership page]] with new membership categories and procedures. Take a look to see what you can do. {{posted|--[[User:SFRailsback|SFRailsback]] 17:34, 10 Nov 2006 (EST)}}
<div style="float:right;">'''[[News|News archive]]<br>
[[SwarmWiki:FAQ#Q._How_do_I_add_a_news_item_to_the_wiki.27s_main_page.3F|How to submit a news item]]'''</div>
| width="45%" style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #ffebcd" |
=Agent- and Individual-based Modeling Resources=
*'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. There are sub-areas for:
**Agent-based modeling community resources, including [[Swarm:_SwarmFest|SwarmFest]], our annual modeling conference
**Software (information on alternative platforms; learning materials; template models; integrated development environments)
**"How and why to do agent-based modeling": techniques and theory
**Resources specific to different scientific domains
*'''modelling@swarm.org: The email community of agent-based modelers.''' This email list discusses topics of general interest to agent-based modelers. [[Swarm:_Mailing_lists|More information and signup here.]]'''
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #FFFFCC" |
[[Image:Small-swarm-logo.jpeg]]
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for Swarm software, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm: applications|Thanks to Paul Johnson, a new package of applications for Swarm-2.2]]'', particularly for Objective C
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #DAFDDA" |
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
*'''[[SDG_membership|Information on SDG membership]]'''
*[https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]
|-
| colspan=2 style="border: 1px solid #c6c9ff; color: #000; padding: .4em .9em .9em; background-color: #d3d3d3" |
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
|}
d9a5c03744ef65f4192a4c66b6816a51fe9104c6
34
32
2015-10-06T14:59:38Z
Railsback
2
/* WWW.SWARM.ORG is back! */
wikitext
text/x-wiki
[[Swarm_and_MinGW]]
[[ABM_Resources]]
[[Swarm_Apps]]
[[Swarm_FAQ]]
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
=WWW.SWARM.ORG is back!=
We have just restored the Swarm Development Group wiki (October 2015), following a major server crash several years ago. We will be gradually cleaning up the site. Its emphasis will be on supporting Swarm software and SDG's annual SwarmFest.
= Getting started =
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]
=News=
==Announcement for Swarmfest 2012==
Email Inquiries to: swarmfest2012@gmail.com
[[Test]] will take place in Downtown Charlotte, N.C. July 29-31, 2012, hosted by the Complex Systems
Institute at the University of North Carolina, Charlotte (http://complexity.uncc.edu/). The conference venue is the UNCC Center City Building http://centercity.uncc.edu/.
Local Map http://centercity.uncc.edu/map-and-directions and Parking http://centercity.uncc.edu/parking
'''Registration can be accomplished at http://www.cvent.com/d/tcqqgn'''
Swamfest is the annual meeting of the Swarm Development Group (SDG), and one of the oldest communities involved in the development and propagation of agent-based modeling. Swarmfest has traditionally involved a mix of both tool-users and tool-developers, drawn from many domains of expertise. These have included, in the past, computer scientists, software engineers, biomedical researchers, ecologists, economists, political scientists, social scientists, resource management specialists and evolutionary biologists. Swarmfest represents a low-key environment for researchers to explore new ideas and approaches, and benefit from a multi-disciplinary environment.
This year we will continue to examine the range of systems being modeled with ABM, with the possibility of providing some guidance as to the suitability of the various types of agent-based models for particular types of modeling goals. We also encourage the sharing of our experiences with attempting to gain acceptance of ABM within our own research communities, and discuss strategies where cross-domain examples/analogies can aid in that process. We will also try to identify future avenues for ABM research, including the "next" generation of ABM tools, platforms and application.
Watch this page for upcoming news on program and logistics.
Hope to see you in Charlotte!
{{posted|--[[User:Gary An|Gary An]] 16 March 2012}}
=New version of Objective-C Swarm for Windows=
There is a new binary (and source) release of Swarm that works with MinGW, a compiler that produces Windows executables. Advantages of this new way to use Swarm in Windows:
* Windows executables can be launched directly from Windows, without needing to launch from inside a Unix-like environment.
* Swarm models can be distributed for use on any Windows computer, without requiring Swarm or MinGW to be installed.
* Faster execution than Cygwin Swarm.
See the yellow "Swarm Software" box on this page.
{{posted|--[[User:SFRailsback|SFRailsback]] 15 Aug 2011}}
=Be a Swarm Development Group Member!=
Membership in SDG is a way to support our efforts to maintain and improve Swarm, and to support agent-based modeling. [[SDG_membership|We just updated our membership page]] with new membership categories and procedures. Take a look to see what you can do. {{posted|--[[User:SFRailsback|SFRailsback]] 17:34, 10 Nov 2006 (EST)}}
<div style="float:right;">'''[[News|News archive]]<br>
[[SwarmWiki:FAQ#Q._How_do_I_add_a_news_item_to_the_wiki.27s_main_page.3F|How to submit a news item]]'''</div>
| width="45%" style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #ffebcd" |
=Agent- and Individual-based Modeling Resources=
*'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. There are sub-areas for:
**Agent-based modeling community resources, including [[Swarm:_SwarmFest|SwarmFest]], our annual modeling conference
**Software (information on alternative platforms; learning materials; template models; integrated development environments)
**"How and why to do agent-based modeling": techniques and theory
**Resources specific to different scientific domains
*'''modelling@swarm.org: The email community of agent-based modelers.''' This email list discusses topics of general interest to agent-based modelers. [[Swarm:_Mailing_lists|More information and signup here.]]'''
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #FFFFCC" |
[[Image:Small-swarm-logo.jpeg]]
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for Swarm software, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm: applications|Thanks to Paul Johnson, a new package of applications for Swarm-2.2]]'', particularly for Objective C
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #DAFDDA" |
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
*'''[[SDG_membership|Information on SDG membership]]'''
*[https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]
|-
| colspan=2 style="border: 1px solid #c6c9ff; color: #000; padding: .4em .9em .9em; background-color: #d3d3d3" |
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
|}
d137b109ddaba754f6bde8dfc84113c990849645
32
22
2015-10-05T21:27:45Z
Railsback
2
wikitext
text/x-wiki
[[Swarm_and_MinGW]]
[[ABM_Resources]]
[[Swarm_Apps]]
[[Swarm_FAQ]]
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
=WWW.SWARM.ORG is back!=
We have just restored the Swarm Development Group wiki, following a major server crash several years ago. We will be gradually cleaning up the site. Its emphasis will be on supporting Swarm software and SDG's annual SwarmFest.
= Getting started =
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]
=News=
==Announcement for Swarmfest 2012==
Email Inquiries to: swarmfest2012@gmail.com
[[Test]] will take place in Downtown Charlotte, N.C. July 29-31, 2012, hosted by the Complex Systems
Institute at the University of North Carolina, Charlotte (http://complexity.uncc.edu/). The conference venue is the UNCC Center City Building http://centercity.uncc.edu/.
Local Map http://centercity.uncc.edu/map-and-directions and Parking http://centercity.uncc.edu/parking
'''Registration can be accomplished at http://www.cvent.com/d/tcqqgn'''
Swamfest is the annual meeting of the Swarm Development Group (SDG), and one of the oldest communities involved in the development and propagation of agent-based modeling. Swarmfest has traditionally involved a mix of both tool-users and tool-developers, drawn from many domains of expertise. These have included, in the past, computer scientists, software engineers, biomedical researchers, ecologists, economists, political scientists, social scientists, resource management specialists and evolutionary biologists. Swarmfest represents a low-key environment for researchers to explore new ideas and approaches, and benefit from a multi-disciplinary environment.
This year we will continue to examine the range of systems being modeled with ABM, with the possibility of providing some guidance as to the suitability of the various types of agent-based models for particular types of modeling goals. We also encourage the sharing of our experiences with attempting to gain acceptance of ABM within our own research communities, and discuss strategies where cross-domain examples/analogies can aid in that process. We will also try to identify future avenues for ABM research, including the "next" generation of ABM tools, platforms and application.
Watch this page for upcoming news on program and logistics.
Hope to see you in Charlotte!
{{posted|--[[User:Gary An|Gary An]] 16 March 2012}}
=New version of Objective-C Swarm for Windows=
There is a new binary (and source) release of Swarm that works with MinGW, a compiler that produces Windows executables. Advantages of this new way to use Swarm in Windows:
* Windows executables can be launched directly from Windows, without needing to launch from inside a Unix-like environment.
* Swarm models can be distributed for use on any Windows computer, without requiring Swarm or MinGW to be installed.
* Faster execution than Cygwin Swarm.
See the yellow "Swarm Software" box on this page.
{{posted|--[[User:SFRailsback|SFRailsback]] 15 Aug 2011}}
=Be a Swarm Development Group Member!=
Membership in SDG is a way to support our efforts to maintain and improve Swarm, and to support agent-based modeling. [[SDG_membership|We just updated our membership page]] with new membership categories and procedures. Take a look to see what you can do. {{posted|--[[User:SFRailsback|SFRailsback]] 17:34, 10 Nov 2006 (EST)}}
<div style="float:right;">'''[[News|News archive]]<br>
[[SwarmWiki:FAQ#Q._How_do_I_add_a_news_item_to_the_wiki.27s_main_page.3F|How to submit a news item]]'''</div>
| width="45%" style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #ffebcd" |
=Agent- and Individual-based Modeling Resources=
*'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. There are sub-areas for:
**Agent-based modeling community resources, including [[Swarm:_SwarmFest|SwarmFest]], our annual modeling conference
**Software (information on alternative platforms; learning materials; template models; integrated development environments)
**"How and why to do agent-based modeling": techniques and theory
**Resources specific to different scientific domains
*'''modelling@swarm.org: The email community of agent-based modelers.''' This email list discusses topics of general interest to agent-based modelers. [[Swarm:_Mailing_lists|More information and signup here.]]'''
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #FFFFCC" |
[[Image:Small-swarm-logo.jpeg]]
=Swarm Software for Agent-based Modeling=
*'''[[Swarm_main_page|The main Swarm page]]''' for Swarm software, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm: applications|Thanks to Paul Johnson, a new package of applications for Swarm-2.2]]'', particularly for Objective C
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #DAFDDA" |
=Swarm Development Group=
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
*'''[[SDG_membership|Information on SDG membership]]'''
*[https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]
|-
| colspan=2 style="border: 1px solid #c6c9ff; color: #000; padding: .4em .9em .9em; background-color: #d3d3d3" |
=Help=
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
|}
27d153a3c590ce1912a590d31737037a9b6b346e
22
14
2015-03-07T06:07:08Z
Pauljohn32
1
wikitext
text/x-wiki
<strong>MediaWiki has been successfully installed.</strong>
[[Swarm_and_MinGW]]
[[ABM_Resources]]
[[Swarm_Apps]]
[[Swarm_FAQ]]
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
== Getting started ==
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]
==News==
===Announcement for Swarmfest 2012===
Email Inquiries to: swarmfest2012@gmail.com
[[Test]] will take place in Downtown Charlotte, N.C. July 29-31, 2012, hosted by the Complex Systems
Institute at the University of North Carolina, Charlotte (http://complexity.uncc.edu/). The conference venue is the UNCC Center City Building http://centercity.uncc.edu/.
Local Map http://centercity.uncc.edu/map-and-directions and Parking http://centercity.uncc.edu/parking
'''Registration can be accomplished at http://www.cvent.com/d/tcqqgn'''
Swamfest is the annual meeting of the Swarm Development Group (SDG), and one of the oldest communities involved in the development and propagation of agent-based modeling. Swarmfest has traditionally involved a mix of both tool-users and tool-developers, drawn from many domains of expertise. These have included, in the past, computer scientists, software engineers, biomedical researchers, ecologists, economists, political scientists, social scientists, resource management specialists and evolutionary biologists. Swarmfest represents a low-key environment for researchers to explore new ideas and approaches, and benefit from a multi-disciplinary environment.
This year we will continue to examine the range of systems being modeled with ABM, with the possibility of providing some guidance as to the suitability of the various types of agent-based models for particular types of modeling goals. We also encourage the sharing of our experiences with attempting to gain acceptance of ABM within our own research communities, and discuss strategies where cross-domain examples/analogies can aid in that process. We will also try to identify future avenues for ABM research, including the "next" generation of ABM tools, platforms and application.
Watch this page for upcoming news on program and logistics.
Hope to see you in Charlotte!
{{posted|--[[User:Gary An|Gary An]] 16 March 2012}}
===New version of Objective-C Swarm for Windows===
There is a new binary (and source) release of Swarm that works with MinGW, a compiler that produces Windows executables. Advantages of this new way to use Swarm in Windows:
* Windows executables can be launched directly from Windows, without needing to launch from inside a Unix-like environment.
* Swarm models can be distributed for use on any Windows computer, without requiring Swarm or MinGW to be installed.
* Faster execution than Cygwin Swarm.
See the yellow "Swarm Software" box on this page.
{{posted|--[[User:SFRailsback|SFRailsback]] 15 Aug 2011}}
===Be a Swarm Development Group Member!===
Membership in SDG is a way to support our efforts to maintain and improve Swarm, and to support agent-based modeling. [[SDG_membership|We just updated our membership page]] with new membership categories and procedures. Take a look to see what you can do. {{posted|--[[User:SFRailsback|SFRailsback]] 17:34, 10 Nov 2006 (EST)}}
<div style="float:right;">'''[[News|News archive]]<br>
[[SwarmWiki:FAQ#Q._How_do_I_add_a_news_item_to_the_wiki.27s_main_page.3F|How to submit a news item]]'''</div>
| width="45%" style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #ffebcd" |
==Agent- and Individual-based Modeling Resources==
*'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. There are sub-areas for:
**Agent-based modeling community resources, including [[Swarm:_SwarmFest|SwarmFest]], our annual modeling conference
**Software (information on alternative platforms; learning materials; template models; integrated development environments)
**"How and why to do agent-based modeling": techniques and theory
**Resources specific to different scientific domains
*'''modelling@swarm.org: The email community of agent-based modelers.''' This email list discusses topics of general interest to agent-based modelers. [[Swarm:_Mailing_lists|More information and signup here.]]'''
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #FFFFCC" |
[[Image:Small-swarm-logo.jpeg]]
==Swarm Software for Agent-based Modeling==
*'''[[Swarm_main_page|The main Swarm page]]''' for Swarm software, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm: applications|Thanks to Paul Johnson, a new package of applications for Swarm-2.2]]'', particularly for Objective C
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #DAFDDA" |
==Swarm Development Group==
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
*'''[[SDG_membership|Information on SDG membership]]'''
*[https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]
|-
| colspan=2 style="border: 1px solid #c6c9ff; color: #000; padding: .4em .9em .9em; background-color: #d3d3d3" |
==Help==
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
|}
324a94b3e33ea7e4267ec27b99c3a722d3b75c40
14
13
2015-03-07T05:38:14Z
Pauljohn32
1
wikitext
text/x-wiki
<strong>MediaWiki has been successfully installed.</strong>
[[Swarm_and_MinGW]]
[[ABMResourceNavigation]]
[[Swarm_Apps]]
[[Swarm_FAQ]]
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
== Getting started ==
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]
==News==
===Announcement for Swarmfest 2012===
Email Inquiries to: swarmfest2012@gmail.com
[[Test]] will take place in Downtown Charlotte, N.C. July 29-31, 2012, hosted by the Complex Systems
Institute at the University of North Carolina, Charlotte (http://complexity.uncc.edu/). The conference venue is the UNCC Center City Building http://centercity.uncc.edu/.
Local Map http://centercity.uncc.edu/map-and-directions and Parking http://centercity.uncc.edu/parking
'''Registration can be accomplished at http://www.cvent.com/d/tcqqgn'''
Swamfest is the annual meeting of the Swarm Development Group (SDG), and one of the oldest communities involved in the development and propagation of agent-based modeling. Swarmfest has traditionally involved a mix of both tool-users and tool-developers, drawn from many domains of expertise. These have included, in the past, computer scientists, software engineers, biomedical researchers, ecologists, economists, political scientists, social scientists, resource management specialists and evolutionary biologists. Swarmfest represents a low-key environment for researchers to explore new ideas and approaches, and benefit from a multi-disciplinary environment.
This year we will continue to examine the range of systems being modeled with ABM, with the possibility of providing some guidance as to the suitability of the various types of agent-based models for particular types of modeling goals. We also encourage the sharing of our experiences with attempting to gain acceptance of ABM within our own research communities, and discuss strategies where cross-domain examples/analogies can aid in that process. We will also try to identify future avenues for ABM research, including the "next" generation of ABM tools, platforms and application.
Watch this page for upcoming news on program and logistics.
Hope to see you in Charlotte!
{{posted|--[[User:Gary An|Gary An]] 16 March 2012}}
===New version of Objective-C Swarm for Windows===
There is a new binary (and source) release of Swarm that works with MinGW, a compiler that produces Windows executables. Advantages of this new way to use Swarm in Windows:
* Windows executables can be launched directly from Windows, without needing to launch from inside a Unix-like environment.
* Swarm models can be distributed for use on any Windows computer, without requiring Swarm or MinGW to be installed.
* Faster execution than Cygwin Swarm.
See the yellow "Swarm Software" box on this page.
{{posted|--[[User:SFRailsback|SFRailsback]] 15 Aug 2011}}
===Be a Swarm Development Group Member!===
Membership in SDG is a way to support our efforts to maintain and improve Swarm, and to support agent-based modeling. [[SDG_membership|We just updated our membership page]] with new membership categories and procedures. Take a look to see what you can do. {{posted|--[[User:SFRailsback|SFRailsback]] 17:34, 10 Nov 2006 (EST)}}
<div style="float:right;">'''[[News|News archive]]<br>
[[SwarmWiki:FAQ#Q._How_do_I_add_a_news_item_to_the_wiki.27s_main_page.3F|How to submit a news item]]'''</div>
| width="45%" style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #ffebcd" |
==Agent- and Individual-based Modeling Resources==
*'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. There are sub-areas for:
**Agent-based modeling community resources, including [[Swarm:_SwarmFest|SwarmFest]], our annual modeling conference
**Software (information on alternative platforms; learning materials; template models; integrated development environments)
**"How and why to do agent-based modeling": techniques and theory
**Resources specific to different scientific domains
*'''modelling@swarm.org: The email community of agent-based modelers.''' This email list discusses topics of general interest to agent-based modelers. [[Swarm:_Mailing_lists|More information and signup here.]]'''
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #FFFFCC" |
[[Image:Small-swarm-logo.jpeg]]
==Swarm Software for Agent-based Modeling==
*'''[[Swarm_main_page|The main Swarm page]]''' for Swarm software, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm: applications|Thanks to Paul Johnson, a new package of applications for Swarm-2.2]]'', particularly for Objective C
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #DAFDDA" |
==Swarm Development Group==
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
*'''[[SDG_membership|Information on SDG membership]]'''
*[https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]
|-
| colspan=2 style="border: 1px solid #c6c9ff; color: #000; padding: .4em .9em .9em; background-color: #d3d3d3" |
==Help==
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
|}
06da193c8bc0cad4971b75d45dcf0644696e3815
13
11
2015-03-07T05:31:50Z
Pauljohn32
1
wikitext
text/x-wiki
<strong>MediaWiki has been successfully installed.</strong>
[[Swarm_and_MinGW]]
[[ABMResourceNavigation]]
[[Swarm_Apps]]
[[Swarm_FAQ]]
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
== Getting started ==
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]
<h1>'''Welcome to the Swarm Development Group Wiki!'''</h1>
<div style="font-size:120%;" align="center">''A resource for agent- and individual-based modelers and the home of'' '''Swarm'''</div>
<div style="font-size:90%;" align="center">The SwarmWiki is hosted by the [http://www.cscs.umich.edu Center for the Study of Complex Systems] at the University of Michigan.</div>
<div align="center">[[#News|News]] | [[#Agent-_and_Individual-based_Modeling_Resources|Agent-based Modeling Resources]] | [[#Swarm|Swarm]] | [[#Swarm_Development_Group|Swarm Development Group]] | [[#Help|Help]] </div>
{|
|-
| width="45%" rowspan=3 valign="top" style="border: 1px solid grey; padding: .4em .9em .9em; background-color: #ccffff" |
==News==
===New version of Objective-C Swarm for Windows===
There is a new binary (and source) release of Swarm that works with MinGW, a compiler that produces Windows executables. Advantages of this new way to use Swarm in Windows:
* Windows executables can be launched directly from Windows, without needing to launch from inside a Unix-like environment.
* Swarm models can be distributed for use on any Windows computer, without requiring Swarm or MinGW to be installed.
* Faster execution than Cygwin Swarm.
See the yellow "Swarm Software" box on this page.
{{posted|--[[User:SFRailsback|SFRailsback]] 15 Aug 2011}}
===Thank you to all the Participants for successful Swarmfest 2011!===
We returned to the Santa Fe Complex (Website http://sfcomplex.org/ ) on June 26 and 27, 2011 for a spirited and successful Swarmfest 2011. Topics covered included: applications of agent-based modeling to education, biomedical research, economics and social science, discussions concerning the use of the terms "emergence" and "complexity," and an update on current and future work on SLAPP (Swarm-like Agent Protocols in Python); a toolkit derived from the original Swarm package with ongoing and active development. We also had the opportunity to hear from 3 of the teams that participated in the 2010-11 New Mexico Supercomputing Challenge (see http://challenge.nm.org ). Visit the [[Swarmfest 2011 Page]] speakers, titles and abstracts. We hope to be posting presentations in the near future as well.
Our old friend, Board member and unofficial photo-archivist, Pietro Terna, has posted photos from Swarmfest 2011 at https://picasaweb.google.com/pietro.terna/SantaFe252962011?feat=directlink .
-Posted by [[User:Gary An|Gary An]]
===Call for Mentors for the 2010-2011 New Mexico Supercomputing Challenge===
For the past two years Swarmfest has served as a venue for participants of the New Mexico Supercomputing Challenge (SCC) to present their work, receive feedback and interact with active researchers using agent based modeling. The SCC is a program committed to teaching teams of middle and high schools students how to use powerful computers to analyze, model and solve world problems. For more information please see http://challenge.nm.org . Agent based modeling has increasingly been used in SCC projects, with two of the top projects from the last two years utilizing agent based modeling. For details of these projects check out "To Kill a Flocking Bird " - http://challenge.nm.org/archive/09-10/finalreports/70.pdf and "Control and Spread of Wildfires" - http://challenge.nm.org/archive/09-10/finalreports/99.pdf . Mentoring can be accomplished online; those interested in more information should go to "The Role of a Challenge Mentor" http://challenge.nm.org/resources/role.shtml and "Questions to discuss with a team" http://challenge.nm.org/resources/tpd.html , or contact '''consult@challenge.nm.org''' for more information. We believe that this is an excellent opportunity to "get them while they are young" and provide an introduction into an exciting and growing area of computational research.
-Posted by [[User:Gary An|Gary An]]
===Be a Swarm Development Group Member!===
Membership in SDG is a way to support our efforts to maintain and improve Swarm, and to support agent-based modeling. [[SDG_membership|We just updated our membership page]] with new membership categories and procedures. Take a look to see what you can do. {{posted|--[[User:SFRailsback|SFRailsback]] 17:34, 10 Nov 2006 (EST)}}
<div style="float:right;">'''[[News|News archive]]<br>
[[SwarmWiki:FAQ#Q._How_do_I_add_a_news_item_to_the_wiki.27s_main_page.3F|How to submit a news item]]'''</div>
| width="45%" style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #ffebcd" |
==Agent- and Individual-based Modeling Resources==
*'''[[ABM_Resources|Resources for agent-based modeling]]'''. This area of the wiki is for information on agent-based modeling in general. There are sub-areas for:
**Agent-based modeling community resources, including [[Swarm:_SwarmFest|SwarmFest]], our annual modeling conference
**Software (information on alternative platforms; learning materials; template models; integrated development environments)
**"How and why to do agent-based modeling": techniques and theory
**Resources specific to different scientific domains
*'''modelling@swarm.org: The email community of agent-based modelers.''' This email list discusses topics of general interest to agent-based modelers. [[Swarm:_Mailing_lists|More information and signup here.]]'''
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #FFFFCC" |
[[Image:Small-swarm-logo.jpeg]]
==Swarm Software for Agent-based Modeling==
*'''[[Swarm_main_page|The main Swarm page]]''' for Swarm software, documentation, and applications
*''New release of Objective-C for Windows'' produces Windows-native executables! See [[Swarm_and_MinGW|Using Swarm on Windows with MinGW]]
*''[[Swarm: applications|Thanks to Paul Johnson, a new package of applications for Swarm-2.2]]'', particularly for Objective C
*''[[Swarm:_Mailing_lists|Email lists for support and modeling]]''
|-
| style="border: 1px solid grey; color: #000; padding: .4em .9em .9em; background-color: #DAFDDA" |
==Swarm Development Group==
*'''[[Swarm Development Group]] (SDG)'''
*'''[[SDG contact|Contact information]]'''
*'''[[SDG_membership|Information on SDG membership]]'''
*[https://www.ku.edu/~pauljohn/sdg/member_pages/ SDG Members]
|-
| colspan=2 style="border: 1px solid #c6c9ff; color: #000; padding: .4em .9em .9em; background-color: #d3d3d3" |
==Help==
* Who can contribute to this wiki? How do you use it? How can you register to edit or add pages? See the [[SwarmWiki:FAQ|FAQ about this wiki]]
* [[SwarmWiki:Objectives_and_organization|Objectives and organization of this wiki]]: what can you find on this wiki, and what is appropriate to add to it, where?
* For general wiki help, see: http://www.wikipedia.org/wiki/Wikipedia:Help
* For help editing the wiki, start with: http://www.wikipedia.org/wiki/Help:Editing
* To ''experiment with editing'' the wiki without worrying about messing up articles, try the [[Wiki sandbox]]
* [[SwarmWiki:Help]] Help page for wiki administrators.
|}
__NOTOC__ __NOEDITSECTION__
95c976ba80cb55bade34ab3ada7c2f428396e69f
11
9
2015-03-07T05:25:40Z
Pauljohn32
1
wikitext
text/x-wiki
<strong>MediaWiki has been successfully installed.</strong>
[[Swarm_and_MinGW]]
[[ABMResourceNavigation]]
[[Swarm_Apps]]
[[Swarm_FAQ]]
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
== Getting started ==
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]
37ec9bdbecbb18de24c71f36f1c3f01c55238ca0
9
7
2015-03-07T05:22:58Z
Pauljohn32
1
wikitext
text/x-wiki
<strong>MediaWiki has been successfully installed.</strong>
[[Swarm_and_MinGW]]
[[ABMResourceNavigation]]
[[Swarm_FAQ]]
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
== Getting started ==
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]
6128673847903eee17fd43d3b628c33f819e0be6
7
5
2015-03-07T05:19:59Z
Pauljohn32
1
wikitext
text/x-wiki
<strong>MediaWiki has been successfully installed.</strong>
[[Swarm_and_MinGW]]
[[ABMResourceNavigation]]
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
== Getting started ==
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]
36e9bd6b17298f9b66b9f3738136871e15123710
5
4
2015-03-07T05:15:22Z
Pauljohn32
1
wikitext
text/x-wiki
<strong>MediaWiki has been successfully installed.</strong>
[[ABMResourceNavigation]]
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
== Getting started ==
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]
950c40ee90e8f9a62a0adf991c906cf912d85548
4
3
2015-03-07T05:10:46Z
Pauljohn32
1
wikitext
text/x-wiki
<strong>MediaWiki has been successfully installed.</strong>
[ABMResourceNavigation]
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
== Getting started ==
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]
e6f7ac6e480eeffc4ac53e49d57c9c07aa063b8c
3
2
2015-03-07T05:10:07Z
Pauljohn32
1
wikitext
text/x-wiki
<strong>MediaWiki has been successfully installed.</strong>
[ABMResourceNavigation:ABM Resource Navigation]
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
== Getting started ==
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]
5ec79af6ee3cbbbaa2a68280b2bdfcc2a06cfcbb
2
1
2015-03-07T05:09:10Z
Pauljohn32
1
wikitext
text/x-wiki
<strong>MediaWiki has been successfully installed.</strong>
[ABMResourceNavigation| ABM Resource Navigation]
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
== Getting started ==
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]
f68f7803f556bde44c6b167564e5d27f1dbed64e
1
2015-03-07T04:59:11Z
MediaWiki default
0
wikitext
text/x-wiki
<strong>MediaWiki has been successfully installed.</strong>
Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.
== Getting started ==
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]
* [//www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localise MediaWiki for your language]
8e0aa2f2a7829587801db67d0424d9b447e09867
OldNews
0
1663
2229
2219
2022-01-25T12:50:10Z
Gepr
9
moved old news from main page
wikitext
text/x-wiki
==2020-09-30: Mailing lists==
[https://lists.nongnu.org/mailman/listinfo/swarm-support Swarm-Support] has been disabled for the indefinite future. We've left the Mailman page, including the archives up for spelunking. But new subscriptions and posts have been disabled.
==2020-07-10: Donation to NetLogo==
The SDG has donated $10,000 to Northwestern University's [http://ccl.northwestern.edu/ Center for Connected Learning and Computer-Based Modeling (CCL)] to support completion and distribution of the [https://github.com/NetLogo/Time-Extension NetLogo "Time" extension], which adds discrete event simulation support to [http://ccl.northwestern.edu/netlogo/ NetLogo].
==2020-06-08: Reconstituted Board of Directors==
The [[Swarm Development Group|SDG]] took a break from organizing SwarmFest. A [[SDG Directors|new board]] has been elected and is planning for the future. Please watch this space for any updates.
==Swarmfest 2016: University of Vermont, July 31 – August 3==
Swamfest is the annual meeting of the Swarm Development Group (SDG), and one of the oldest communities involved in the development and propagation of agent-based modeling. Swarmfest has traditionally involved a mix of both tool-users and tool-developers, drawn from many domains of expertise. These have included, in the past, computer scientists, software engineers, biomedical researchers, ecologists, economists, political scientists, social scientists, resource management specialists and evolutionary biologists. Swarmfest represents a low-key environment for researchers to explore new ideas and approaches, and benefit from a multi-disciplinary environment.
SwarmFest 2016 will be at the University of Vermont in Burlington, Vermont, USA. Abstracts are now being accepted. For information [http://www.swarmfest2016.org/ click here.]
==New version of Objective-C Swarm for Windows==
There is a new binary (and source) release of Swarm that works with MinGW, a compiler that produces Windows executables. Advantages of this new way to use Swarm in Windows:
* Windows executables can be launched directly from Windows, without needing to launch from inside a Unix-like environment.
* Swarm models can be distributed for use on any Windows computer, without requiring Swarm or MinGW to be installed.
* Faster execution than Cygwin Swarm.
See [[Swarm_and_MinGW]]
904f8d7198ba8b438861000a2163c99596049f58
2219
2020-06-09T00:16:58Z
Gepr
9
moved old news from main page
wikitext
text/x-wiki
==Swarmfest 2016: University of Vermont, July 31 – August 3==
Swamfest is the annual meeting of the Swarm Development Group (SDG), and one of the oldest communities involved in the development and propagation of agent-based modeling. Swarmfest has traditionally involved a mix of both tool-users and tool-developers, drawn from many domains of expertise. These have included, in the past, computer scientists, software engineers, biomedical researchers, ecologists, economists, political scientists, social scientists, resource management specialists and evolutionary biologists. Swarmfest represents a low-key environment for researchers to explore new ideas and approaches, and benefit from a multi-disciplinary environment.
SwarmFest 2016 will be at the University of Vermont in Burlington, Vermont, USA. Abstracts are now being accepted. For information [http://www.swarmfest2016.org/ click here.]
==New version of Objective-C Swarm for Windows==
There is a new binary (and source) release of Swarm that works with MinGW, a compiler that produces Windows executables. Advantages of this new way to use Swarm in Windows:
* Windows executables can be launched directly from Windows, without needing to launch from inside a Unix-like environment.
* Swarm models can be distributed for use on any Windows computer, without requiring Swarm or MinGW to be installed.
* Faster execution than Cygwin Swarm.
See [[Swarm_and_MinGW]]
2f400325ac9d0c0d211547429b6f4f918d321e8c
SDG Directors
0
1659
2242
2241
2024-05-07T16:01:03Z
Gepr
9
wikitext
text/x-wiki
SDG's board of directors currently has these members and officers. (Updates Needed!)
=Directors=
Directors are elected for 2-year terms, and each director can serve up to five terms before leaving the board for at least one year. Unless otherwise noted, terms begin and end on May 15 (coinciding with the date the NM SoS Annual report is due) of the years in this table.
{| class="wikitable" style="text-align: center;"
|+ Current Directors
|-
! Name
! End of current term
! Consecutive Terms
|-
| [[User:Tedsaid|Ted Carmichael]]
| 2024
| 3
|-
| [[User:MMorini|Matteo Morini]]
| 2024
| 3
|-
| Gary An
| 2024
| 1
|-
| Marcus Daniels
| 2024
| 1
|-
| [[User:Gepr|Glen Ropella]]
| 2024
| 1
|-
| Roger Burkhart
| 2024
| 1
|-
|}
=Officers=
Officers are elected annually.
{| class="wikitable"
|+Current Officers
|-
|Executive Director/President
|Glen Ropella
|-
|Vice President
|Gary An
|-
|Secretary
|Roger Burkhart
|-
|Treasurer
|Ted Carmichael
|}
ca1b4c329b163da5882c3efe306828f8525abfa2
2241
2239
2024-05-07T15:56:41Z
Gepr
9
wikitext
text/x-wiki
SDG's board of directors currently has these members and officers. (Updates Needed!)
=Directors=
Directors are elected for 2-year terms, and each director can serve up to five terms before leaving the board for at least one year. Unless otherwise noted, terms begin and end on May 15 (coinciding with the date the NM SoS Annual report is due) of the years in this table.
{| class="wikitable" style="text-align: center;"
|+ Current Directors
|-
! Name
! End of current term
! Consecutive Terms
|-
| [[User:Tedsaid|Ted Carmichael]]
| 2024
| ?
|-
| [[User:MMorini|Matteo Morini]]
| 2024
| ?
|-
| Gary An
| 2024
| ?
|-
| Marcus Daniels
| 2024
| ?
|-
| [[User:Gepr|Glen Ropella]]
| 2024
| 1
|-
| Roger Burkhart
| 2024
| 1
|-
|}
=Officers=
Officers are elected annually.
{| class="wikitable"
|+Current Officers
|-
|Executive Director/President
|Glen Ropella
|-
|Vice President
|Gary An
|-
|Secretary
|Roger Burkhart
|-
|Treasurer
|Ted Carmichael
|}
cd24d927d27090bcbdc350d830b42267079915fd
2239
2238
2024-05-07T15:34:07Z
Gepr
9
add links to user pages
wikitext
text/x-wiki
SDG's board of directors currently has these members and officers. (Updates Needed!)
=Directors=
Directors are elected for 2-year terms, and each director can serve up to five terms before leaving the board for at least one year. Unless otherwise noted, terms begin and end on May 15 (coinciding with the date the NM SoS Annual report is due) of the years in this table.
{| class="wikitable" style="text-align: center;"
|+ Current Directors
|-
! Name
! End of current term
! Consecutive Terms
|-
| [[User:Tedsaid|Ted Carmichael]]
| 2024
| ?
|-
| [[User:MMorini|Matteo Morini]]
| 2024
| ?
|-
| Gary An
| 2024
| ?
|-
| Marcus Daniels
| 2024
| ?
|-
| [[User:Gepr|Glen Ropella]]
| 2024
| 1
|-
| Roger Burkhart
| 2024
| ?
|-
|}
=Officers=
Officers are elected annually.
{| class="wikitable"
|+Current Officers
|-
|Executive Director/President
|Glen Ropella
|-
|Vice President
|Gary An
|-
|Secretary
|Roger Burkhart
|-
|Treasurer
|Ted Carmichael
|}
d661108fa28a816b6c91c93e46cecdeb492e6dbe
2238
2237
2024-05-07T15:21:07Z
Gepr
9
center cell content
wikitext
text/x-wiki
SDG's board of directors currently has these members and officers. (Updates Needed!)
=Directors=
Directors are elected for 2-year terms, and each director can serve up to five terms before leaving the board for at least one year. Unless otherwise noted, terms begin and end on May 15 (coinciding with the date the NM SoS Annual report is due) of the years in this table.
{| class="wikitable" style="text-align: center;"
|+ Current Directors
|-
! Name
! End of current term
! Consecutive Terms
|-
| Ted Carmichael
| 2024
| ?
|-
| Matteo Morini
| 2024
| ?
|-
| Gary An
| 2024
| ?
|-
| Marcus Daniels
| 2024
| ?
|-
| Glen Ropella
| 2024
| 1
|-
| Roger Burkhart
| 2024
| ?
|-
|}
=Officers=
Officers are elected annually.
{| class="wikitable"
|+Current Officers
|-
|Executive Director/President
|Glen Ropella
|-
|Vice President
|Gary An
|-
|Secretary
|Roger Burkhart
|-
|Treasurer
|Ted Carmichael
|}
d19d1ef0c2dc36c070a71bc1673a636aab06bedd
2237
2236
2024-05-07T15:17:22Z
Gepr
9
add column for consecutive counts
wikitext
text/x-wiki
SDG's board of directors currently has these members and officers. (Updates Needed!)
=Directors=
Directors are elected for 2-year terms, and each director can serve up to five terms before leaving the board for at least one year. Unless otherwise noted, terms begin and end on May 15 (coinciding with the date the NM SoS Annual report is due) of the years in this table.
{| class="wikitable"
|+ Current Directors
|-
! Name
! End of current term
! Consecutive Terms
|-
| Ted Carmichael
| 2024
| ?
|-
| Matteo Morini
| 2024
| ?
|-
| Gary An
| 2024
| ?
|-
| Marcus Daniels
| 2024
| ?
|-
| Glen Ropella
| 2024
| 1
|-
| Roger Burkhart
| 2024
| ?
|-
|}
=Officers=
Officers are elected annually.
{| class="wikitable"
|+Current Officers
|-
|Executive Director/President
|Glen Ropella
|-
|Vice President
|Gary An
|-
|Secretary
|Roger Burkhart
|-
|Treasurer
|Ted Carmichael
|}
e1429e2e22171ab53f52359020e994dd78065496
2236
2230
2024-04-15T14:11:53Z
Gepr
9
changed the date of the director terms
wikitext
text/x-wiki
SDG's board of directors currently has these members and officers. (Updates Needed!)
=Directors=
Directors are elected for 2-year terms, and each director can serve up to five terms before leaving the board for at least one year. Unless otherwise noted, terms begin and end on May 15 (coinciding with the date the NM SoS Annual report is due) of the years in this table.
{| class="wikitable"
|+ Current Directors
|-
! Name
! End of current term
|-
| Ted Carmichael
| 2024
|-
| Matteo Morini
| 2024
|-
| Gary An
| 2024
|-
| Marcus Daniels
| 2024
|-
| Glen Ropella
| 2024
|-
| Roger Burkhart
| 2024
|-
|}
=Officers=
Officers are elected annually.
{| class="wikitable"
|+Current Officers
|-
|Executive Director/President
|Glen Ropella
|-
|Vice President
|Gary An
|-
|Secretary
|Roger Burkhart
|-
|Treasurer
|Ted Carmichael
|}
1b935e93d0465d8cab66264bc51fe888f1d707ca
2230
2227
2022-02-22T14:06:24Z
Gepr
9
update with results of officer election 2022
wikitext
text/x-wiki
SDG's board of directors currently has these members and officers. (Updates Needed!)
=Directors=
Directors are elected for 2-year terms, and each director can serve up to five terms before leaving the board for at least one year. Unless otherwise noted, terms begin and end on March 30 of the years in this table.
{| class="wikitable"
|+ Current Directors
|-
! Name
! End of current term
|-
| Ted Carmichael
| 2024
|-
| Matteo Morini
| 2024
|-
| Gary An
| 2024
|-
| Marcus Daniels
| 2024
|-
| Glen Ropella
| 2024
|-
| Roger Burkhart
| 2024
|-
|}
=Officers=
Officers are elected annually.
{| class="wikitable"
|+Current Officers
|-
|Executive Director/President
|Glen Ropella
|-
|Vice President
|Gary An
|-
|Secretary
|Roger Burkhart
|-
|Treasurer
|Ted Carmichael
|}
7f636ab4165457401b48e3889f5328660d056a71
2227
2224
2022-01-25T11:54:16Z
Gepr
9
update directors per 2022 election
wikitext
text/x-wiki
SDG's board of directors currently has these members and officers. (Updates Needed!)
=Directors=
Directors are elected for 2-year terms, and each director can serve up to five terms before leaving the board for at least one year. Unless otherwise noted, terms begin and end on March 30 of the years in this table.
{| class="wikitable"
|+ Current Directors
|-
! Name
! End of current term
|-
| Ted Carmichael
| 2024
|-
| Matteo Morini
| 2024
|-
| Gary An
| 2024
|-
| Marcus Daniels
| 2024
|-
| Glen Ropella
| 2024
|-
| Roger Burkhart
| 2024
|-
|}
=Officers=
Officers are elected annually.
{| class="wikitable"
|+Current Officers
|-
|Executive Director/President
|Ted Carmichael
|-
|Vice President
|Matteo Morini
|-
|Secretary
|Glen Ropella
|-
|Treasurer
|Jim Anderson
|}
671be521cb0b6470c7054982ecd9dfcf9536d468
2224
2221
2021-08-12T15:50:32Z
Gepr
9
/* Officers */ Added me as secretary and Jim as treasurer
wikitext
text/x-wiki
SDG's board of directors currently has these members and officers. (Updates Needed!)
=Directors=
Directors are elected for 2-year terms, and each director can serve up to five terms before leaving the board for at least one year. Unless otherwise noted, terms begin and end on March 30 of the years in this table.
{| class="wikitable"
|+ Current Directors
|-
! Name
! End of current term
|-
| Ted Carmichael
| 2022
|-
| Matteo Morini
| 2022
|-
| Asim Zia
| 2022
|-
| Jim Anderson
| 2022
|-
| Gary An
| 2022
|-
| Marcus Daniels
| 2022
|-
| Pietro Terna
| 2022
|-
| Glen Ropella
| 2022
|-
| Roger Burkhart
| 2022
|-
| Ivan Garibay
| 2022
|-
| Steve Railsback
| 2022
|-
| Mirsad Hadzikadic
| 2022
|-
|}
=Officers=
Officers are elected annually.
{| class="wikitable"
|+Current Officers
|-
|Executive Director/President
|Ted Carmichael
|-
|Vice President
|Matteo Morini
|-
|Secretary
|Glen Ropella
|-
|Treasurer
|Jim Anderson
|}
d1561c5dc9da67a0ede00921aad7e6d46569c196
2221
2216
2020-06-11T15:27:18Z
Gepr
9
deleted affiliations and date first elected
wikitext
text/x-wiki
SDG's board of directors currently has these members and officers. (Updates Needed!)
=Directors=
Directors are elected for 2-year terms, and each director can serve up to five terms before leaving the board for at least one year. Unless otherwise noted, terms begin and end on March 30 of the years in this table.
{| class="wikitable"
|+ Current Directors
|-
! Name
! End of current term
|-
| Ted Carmichael
| 2022
|-
| Matteo Morini
| 2022
|-
| Asim Zia
| 2022
|-
| Jim Anderson
| 2022
|-
| Gary An
| 2022
|-
| Marcus Daniels
| 2022
|-
| Pietro Terna
| 2022
|-
| Glen Ropella
| 2022
|-
| Roger Burkhart
| 2022
|-
| Ivan Garibay
| 2022
|-
| Steve Railsback
| 2022
|-
| Mirsad Hadzikadic
| 2022
|-
|}
=Officers=
Officers are elected annually.
{| class="wikitable"
|+Current Officers
|-
|Executive Director/President
|Ted Carmichael
|-
|Vice President
|Matteo Morini
|-
|Secretary
|
|-
|Treasurer
|
|}
14ad58ab82829f9ba45d302aee8ed8a320a79beb
2216
2210
2020-06-08T23:33:18Z
Gepr
9
2020 elected board members
wikitext
text/x-wiki
SDG's board of directors currently has these members and officers. (Updates Needed!)
=Directors=
Directors are elected for 2-year terms, and each director can serve up to five terms before leaving the board for at least one year. Unless otherwise noted, terms begin and end on March 30 of the years in this table.
{| class="wikitable"
|+ Current Directors
|-
! Name
! Affiliation
! Start of first term
! End of current term
|-
| Ted Carmichael
| UNC, Charlotte, NC
| 2015
| 2022
|-
| Matteo Morini
| U. of Turin, Italy and ENS Lyon, France
| 2015
| 2022
|-
| Asim Zia
| UVM, Burlington, VT
| 2016
| 2022
|-
| Jim Anderson
| ????
| ????
| 2022
|-
| Gary An
| ????
| ????
| 2022
|-
| Marcus Daniels
| ????
| ????
| 2022
|-
| Pietro Terna
| ????
| ????
| 2022
|-
| Glen Ropella
| ????
| ????
| 2022
|-
| Roger Burkhart
| ????
| ????
| 2022
|-
| Ivan Garibay
| ????
| ????
| 2022
|-
| Steve Railsback
| ????
| ????
| 2022
|-
| Mirsad Hadzikadic
| ????
| ????
| 2022
|-
|}
=Officers=
Officers are elected annually.
{| class="wikitable"
|+Current Officers
|-
|Executive Director/President
|Ted Carmichael
|-
|Vice President
|Matteo Morini
|-
|Secretary
|
|-
|Treasurer
|
|}
f9c6796c255e215fc2ecdb179633e1a17be89d5a
2210
2204
2016-10-20T15:25:36Z
MMorini
6
Bootstrapped directors list
wikitext
text/x-wiki
SDG's board of directors currently has these members and officers. (Updates Needed!)
=Directors=
Directors are elected for 2-year terms, and each director can serve up to five terms before leaving the board for at least one year. Unless otherwise noted, terms begin and end on March 30 of the years in this table.
{| class="wikitable"
|+ Current Directors
|-
! Name
! Affiliation
! Start of first term
! End of current term
|-
| Ted Carmichael
| UNC, Charlotte, NC
| 2015
| 2017
|-
| Matteo Morini
| U. of Turin, Italy and ENS Lyon, France
| 2015
| 2017
|-
| Asim Zia
| UVM, Burlington, VT
| 2016
| 2018
|-
| n
| a
| s
| e
|-
|}
=Officers=
Officers are elected annually.
{| class="wikitable"
|+Current Officers
|-
|Executive Director/President
|Ted Carmichael
|-
|Vice President
|Matteo Morini
|-
|Secretary
|
|-
|Treasurer
|
|}
40e4043fc15857912752aeb3ba20f95b79d962f0
2204
2203
2016-06-09T20:51:35Z
SRogers
8
wikitext
text/x-wiki
SDG's board of directors currently has these members and officers. (Updates Needed!)
=Directors=
Directors are elected for 2-year terms, and each director can serve up to five terms before leaving the board for at least one year. Unless otherwise noted, terms begin and end on March 30 of the years in this table.
{| class="wikitable"
|+ Current Directors
|-
! Name
! Affiliation
! Start of first term
! End of current term
|-
| n
| a
| s
| e
|-
|}
=Officers=
Officers are elected annually.
{| class="wikitable"
|+Current Officers
|-
|Executive Director/President
|
|-
|Vice President
|
|-
|Secretary
|
|-
|Treasurer
|
|}
4207394cdce365074363f016553f525b0b8361e2
2203
2201
2016-06-09T20:48:26Z
SRogers
8
/* Officers */
wikitext
text/x-wiki
SDG's board of directors currently has these members and officers. (Updated July 2008)
=Directors=
Directors are elected for 2-year terms, and each director can serve up to five terms before leaving the board for at least one year. Unless otherwise noted, terms begin and end on March 30 of the years in this table.
{| class="wikitable"
|+ Current Directors
|-
! Name
! Affiliation
! Start of first term
! End of current term
|-
| n
| a
| s
| e
|-
|}
=Officers=
Officers are elected annually.
{| class="wikitable"
|+Current Officers
|-
|Executive Director/President
|
|-
|Vice President
|
|-
|Secretary
|
|-
|Treasurer
|
|}
fb73322202c47eeda4ec1e8f12273c5b8757e55f
2201
2200
2016-06-07T19:33:04Z
SRogers
8
wikitext
text/x-wiki
SDG's board of directors currently has these members and officers. (Updated July 2008)
=Directors=
Directors are elected for 2-year terms, and each director can serve up to five terms before leaving the board for at least one year. Unless otherwise noted, terms begin and end on March 30 of the years in this table.
{| class="wikitable"
|+ Current Directors
|-
! Name
! Affiliation
! Start of first term
! End of current term
|-
| n
| a
| s
| e
|-
|}
=Officers=
Officers are elected annual.
{| class="wikitable"
|+Current Officers
|-
|Executive Director/President
|
|-
|Vice President
|
|-
|Secretary
|
|-
|Treasurer
|
|}
7f9afd28e81a68ce2be08141d84bf95146df45e6
2200
2199
2016-06-07T19:10:24Z
SRogers
8
wikitext
text/x-wiki
SDG's board of directors currently has these members and officers. (Updated July 2008)
Directors
Directors are elected for 2-year terms, and each director can serve up to five terms before leaving the board for at least one year. Unless otherwise noted, terms begin and end on March 30 of the years in this table.
=Officers=
Officers are elected annually.
{| class="wikitable"
|+Current Officers
|-
|Executive Director/President
|
|-
|Vice President
|
|-
|Secretary
|
|-
|Treasurer
|
|}
7e1bd37e04221b8c46faab43e7093525375de8e4
2199
2016-06-07T19:09:34Z
SRogers
8
Created page with "SDG's board of directors currently has these members and officers. (Updated July 2008) Directors Directors are elected for 2-year terms, and each director can serve up to fiv..."
wikitext
text/x-wiki
SDG's board of directors currently has these members and officers. (Updated July 2008)
Directors
Directors are elected for 2-year terms, and each director can serve up to five terms before leaving the board for at least one year. Unless otherwise noted, terms begin and end on March 30 of the years in this table.
Officers
Officers are elected annually.
{| class="wikitable"
|+Current Officers
|-
|Executive Director/President
|
|-
|Vice President
|
|-
|Secretary
|
|-
|Treasurer
|
|}
63fe4e27ca29b7a38361c61b6e71d221464de93a
SDG contact
0
1662
2217
2020-06-08T23:57:20Z
Gepr
9
add an info email address
wikitext
text/x-wiki
[mailto:info-at-swarm.org info-at-swarm.org]
7ae48b4f9b0030945b2b173a64bbdfd27a6c3ba1
SwarmWiki:Objectives and organization
0
11
21
2015-03-07T06:05:25Z
Pauljohn32
1
Created page with " ==Wiki Objectives== This site has three distinct objectives: * Provide resources and support for all agent- and individual-based modelers, regardless of their scientific dom..."
wikitext
text/x-wiki
==Wiki Objectives==
This site has three distinct objectives:
* Provide resources and support for all agent- and individual-based modelers, regardless of their scientific domain and software platform
* Distribute and support the Swarm platform for agent-based modeling
* Provide a home for the Swarm Development Group.
==Organization of the [[Main_Page|Main Page]]==
This page has five sections. The overall format is designed to let users easily see (a) major news items without having to link through to other pages, while also (b) the full range of content available on the site. Therefore, the page has a left-hand column of news, and three very concise boxes---one for each of the wiki's three objectives---in the right column. A help box is at the bottom.
===News (blue box)===
* The News box contains news items of general interest to agent-based modelers and Swarm users.
* Appropriate items include major announcements concerning Swarm or other platforms, SwarmFest and other conferences, changes to the wiki, new publications of widespread interest, etc.
* Users are encouraged to contribute news items following [[SwarmWiki:FAQ#Q._How_do_I_add_a_news_item_to_the_wiki.27s_main_page.3F|this procedure]].
* News items are labeled with the date they were posted and are eventually moved to an archive. (This label is added via the "posted" template and the "Your signature plus timestamp" button on the Wiki editor.) (Items must be manually moved to the archive page.)
===Agent- and Individual-based Modeling Resources (tan box)===
* This section addresses the first objective, by providing information of general interest.
* Items are formatted in an "unordered list" (bullet lists), with each item consisting of a short announcement linked to a page on the wiki where details are posted. This format allows users to see and go to a lot of information in a small space.
* One item is a link to a Modeling Resources main page, where all the content on general resources is available.
===Swarm Software (rose box)===
* This section addresses the second objective, providing an entryway into the wiki's resources for Swarm software.
* Items are formatted in an unordered list of short announcements linked to wiki pages where details are posted.
* One item is a link to a Swarm software main page, which has links to all the Swarm resources.
===Swarm Development Group (green box)===
* This section addresses the third objective by providing links to information on SDG.
* Like the previous two sections, items are a bullet list of links. One link is to a main page for SDG.
===Help (grey box)===
* Includes a link to this description of the wiki's format and objectives
* Includes links to help pages within our wiki and to WikiMedia's documentation.
==Organization of the [[ABM_Resources|ABM Resources page]]==
The ABM Resources page is the main page for content of general interest to agent-based modelers. It has four sections, plus a help box at the bottom.
Each of the boxes on the [[ABM_Resources|ABM Resources page]] contains a series of bullets that each briefly describing a resource and contain a link to a page for that resource.
===User Community Resources===
This section provides information on user community resources and events: email lists, meetings, etc. where agent-based modelers can interact and support each other.
===Software Resources===
This section provides general information on software for agent-based modeling. Appropriate content includes information comparing platforms and helping people select a platform, and resources for learning platforms that are not specific to any one platform. It does ''not'' provide detailed information on any particular software platform.
===Why and How to do Agent-based and Individual-based Modeling===
This section addresses general methodological and philosophical issues. Content should include information on when agent-based approaches are appropriate, how to build and test ABMs, how to apply ABMs to scientific or management problems, and how to publish results.
===Domain-Specific Resources===
This section contains or points to resources in specific scientific domains where agent-based modeling is used.
__NOEDITSECTION__
e7edbae817e6446af21328212dcf8ad08451635f
Swarm Apps
0
5
12
2015-03-07T05:25:56Z
Pauljohn32
1
Created page with " We make a wide variety of Swarm models available. These illustrate the many different kinds of research questions addressed using agent-based models, and provide example ide..."
wikitext
text/x-wiki
We make a wide variety of Swarm models available. These illustrate the many different kinds of research questions addressed using agent-based models, and provide example ideas and software for other modelers.
==Demo page==
For newcomers, [[Examples_of_Swarm_applications|here is a peek at a couple of classic Swarm applications]].
==How to choose and run example applications==
(For a discussion of Java vs. Objective-C, see the FAQ: [[Swarm_FAQ]])
===Objective-C applications===
Listed below are sites where you can download Objective-C Swarm models. To run them:
*Download and un-zip the archive. The archives are usually in TAR GZIP format (e.g., HeatBugs.tar.gz), which you can unzip (in a Linux terminal window or, if using Windows, in Cygwin) by typing "tar xzvf HeatBugs.tar.gz".
*Change directories into the newly unzipped directory of source code (in a Linux terminal window or, if using Windows, in Cygwin).
*If your Swarm installation is set up correctly, you can then compile the application by simply typing "make". (If you get a message something like "Makefile: ... /Makefile.appl: No such file or directory..." then you do not have the environment variable SWARMHOME set correctly. Keep reading...)
*If compilation is successful, you will have a new executable file (e.g., "heatbugs.exe" in Windows; "heatbugs" in Linux). Then you can start the model by typing "./heatbugs.exe" (or, in Linux, "./heatbugs").
*A common problem is not having your system's SWARMHOME environment variable correctly pointed to the location of your Swarm installation. SWARMHOME should typically be /usr/local/ or /usr/ if you've installed it from a binary package on a GNU/Linux system. For Windows, see [[Windows_binary_notes]]
===Java applications===
We provide step-by-step [[instructions]] for compiling and running the Java program Jheatbugs-3.0 on Windows XP using Swarm 2.2. Our demo covers interactive (visual) mode as well as batch mode (multiple runs with output to files).
Other Java Swarm models are listed below.
==Official applications archive==
Our official archive of Swarm applications is at http://ftp.swarm.org/pub/swarm/apps/. Even though these models are generally old, many of them still work in Swarm 2.2. There are far more Objective-C than Java applications in the archive.
The archive includes Java versions of the Swarm classics heatbugs and mousetrap. The versions that worked with Swarm-2.1.1 and Swarm-2.2 are currently available in the testing subdirectory of the ftp archive. Look for [http://ftp.swarm.org/pub/swarm/apps/java/sdg/testing/jheatbugs-2001-03-28.tar.gz jheatbugs-2001-03-28.tar.gz] and [http://ftp.swarm.org/pub/swarm/apps/java/sdg/testing/jmousetrap-2001-09-13.tar.gz jmousetrap-2001-09-13.tar.gz].
We strongly encourage people to contribute new applications! The site includes a form for describing contributions.
==Paul Johnson's package of Objective-C applications==
[[User:Pauljohn|Paul Johnson]] has generously assembled a new package of applications for Swarm-2.2. This is a revised version, correcting a couple of glitches in saving of screen snapshots. It is available from Paul's web site: http://www.ku.edu/~pauljohn/Swarm/swarmapps-objc-2.2-2.tar.gz and also at the Swarm download site: http://ftp.swarm.org/pub/swarm/apps/objc/sdg/swarmapps-objc-2.2-2.tar.gz. Please keep testing and let Paul know how it works.
The package contains classic example Swarm applications, including:
*The Swarm tutorial (discussed in [[Swarm:_documentation_main_page#Swarm_User_Guide|the Swarm User Guide]])
*Heatbugs
*Mousetrap
*ArborgamesII (a simulation of forests used in publications by M. Savage et al.)
*SchellingII (Schelling's neighborhood segregation model)
*Conway (the Game of Life)
*sss (Swarm Sugar Scape).
We are soliciting volunteers who want to maintain some 'orphaned' applications from swarmapps-2.1.1. These apps that need love and attention are market, template, and hello-world. If you are interested in taking on one of those applications, or offering up other applications, contact [[User:Pauljohn|PJ]].
==Additional links==
*The world-famous Artificial Stock Market has its own homepage at http://artstkmkt.sourceforge.net (Objective-C)
*Paul Johnson keeps many examples of Swarm-related code, his own models, and other people's models, at: http://www.ku.edu/~pauljohn/Swarm/
*Keep your eye on the [[ABM_Resources|Agent-based modeling community pages]] for projects using Swarm.
*See the [[ABM_Resources#Software_Resources|software resources at the ABM Resources area of the wiki]] for a series of template models in Java and Objective-C Swarm, and for guidance on using Swarm with integrated development environments.
----
b748dfae985cf594db647c372247d1bf1a2f710a
Swarm Development Group
0
1658
2234
2225
2022-08-19T22:08:28Z
Gepr
9
Add link to AoA and Bylaws
wikitext
text/x-wiki
This wiki site is maintained by the Swarm Development Group (SDG). This area of the wiki serves as SDG's home page.
SDG is currently an all-volunteer organization. It takes a significant effort to maintain the wiki, maintain and improve Swarm, and provide user support. Please volunteer a little of your time to help...contact us via email or talk to us at SwarmFest.
See the menu at the right for links to SDG's charter and corporate documents, a list of officers and SDG's board of directors, and contact information.
= Mission Statement =
The Swarm Development Group (SDG) was founded in September 1999 as a private, not-for-profit [501c(3)] organization to support agent-based modeling and simulation. The purposes of the SDG are to:
# promote the free interchange of agent based simulations among computing specialists and the public
# develop and maintain the integrity and competence of individuals engaged in the practice of agent based simulation.
= Supporting Swarm Development Group and Swarm =
SDG is funded by donations and its SwarmFest conferences. Currently, SDG has no paid staff and all work on the wiki and Swarm is done via volunteers and occasional contracts.
*'''[[SDG_Directors]]'''
*'''[[:File:AoA_and_Bylaws-signed.pdf|Articles of Incorporation and Bylaws]]'''
bf8a51e937cd6be76c0c39a8f3fc3774d592fc00
2225
2198
2021-11-22T19:20:30Z
Gepr
9
update given new bylaws
wikitext
text/x-wiki
This wiki site is maintained by the Swarm Development Group (SDG). This area of the wiki serves as SDG's home page.
SDG is currently an all-volunteer organization. It takes a significant effort to maintain the wiki, maintain and improve Swarm, and provide user support. Please volunteer a little of your time to help...contact us via email or talk to us at SwarmFest.
See the menu at the right for links to SDG's charter and corporate documents, a list of officers and SDG's board of directors, and contact information.
= Mission Statement =
The Swarm Development Group (SDG) was founded in September 1999 as a private, not-for-profit [501c(3)] organization to support agent-based modeling and simulation. The purposes of the SDG are to:
# promote the free interchange of agent based simulations among computing specialists and the public
# develop and maintain the integrity and competence of individuals engaged in the practice of agent based simulation.
= Supporting Swarm Development Group and Swarm =
SDG is funded by donations and its SwarmFest conferences. Currently, SDG has no paid staff and all work on the wiki and Swarm is done via volunteers and occasional contracts.
*'''[[SDG_Directors]]'''
5145a17b13e04e45be46292cbc8483fa5ce99251
2198
2196
2016-06-07T18:51:32Z
SRogers
8
wikitext
text/x-wiki
This wiki site is maintained by the Swarm Development Group (SDG). This area of the wiki serves as SDG's home page.
SDG is currently an all-volunteer organization. It takes a significant effort to maintain the wiki, maintain and improve Swarm, and provide user support. Please volunteer a little of your time to help...contact us via email or talk to us at SwarmFest.
See the menu at the right for links to information on becoming and SDG member, SDG's charter and corporate documents, a list of the members and officers of SDG's board of directors, and contact information.
= Mission Statement =
The Swarm Development Group (SDG) was founded in September 1999 as a private, not-for-profit [501c(3)] organization to support the development of the Swarm Simulation System (Swarm) and the interests of the group members. The purposes of the SDG are to:
# advance the state-of-the-art in multi agent based simulation through the continued advancement of the Swarm Simulation System and support of the Swarm user community
# promote the free interchange of multi agent based simulations among computing specialists and the public
# develop and maintain the integrity and competence of individuals engaged in the practice of agent based simulation.
= Supporting Swarm Development Group and Swarm =
SDG is funded by member contributions and its SwarmFest conferences. Currently, SDG has no paid staff and all work on the wiki and Swarm is done via volunteers and occasional contracts. If you use this wiki, and especially if you use Swarm, you should join SDG and contribute time or funding. Put an SDG membership in your project budget and see our membership page for how to contribute it.
Membership list
*'''[[SDG_Directors]]'''
*'''[[SDG_Members]]'''
88b60d4449b31d0308f5ad6f72e1ebd5c3877892
2196
2195
2016-06-06T22:06:43Z
SRogers
8
wikitext
text/x-wiki
This wiki site is maintained by the Swarm Development Group (SDG). This area of the wiki serves as SDG's home page.
SDG is currently an all-volunteer organization. It takes a significant effort to maintain the wiki, maintain and improve Swarm, and provide user support. Please volunteer a little of your time to help...contact us via email or talk to us at SwarmFest.
See the menu at the right for links to information on becoming and SDG member, SDG's charter and corporate documents, a list of the members and officers of SDG's board of directors, and contact information.
= Mission Statement =
The Swarm Development Group (SDG) was founded in September 1999 as a private, not-for-profit [501c(3)] organization to support the development of the Swarm Simulation System (Swarm) and the interests of the group members. The purposes of the SDG are to:
# advance the state-of-the-art in multi agent based simulation through the continued advancement of the Swarm Simulation System and support of the Swarm user community
# promote the free interchange of multi agent based simulations among computing specialists and the public
# develop and maintain the integrity and competence of individuals engaged in the practice of agent based simulation.
= Supporting Swarm Development Group and Swarm =
SDG is funded by member contributions and its SwarmFest conferences. Currently, SDG has no paid staff and all work on the wiki and Swarm is done via volunteers and occasional contracts. If you use this wiki, and especially if you use Swarm, you should join SDG and contribute time or funding. Put an SDG membership in your project budget and see our membership page for how to contribute it.
Membership list
A list of current and former members of SDG is here:
SDG Members
492dc4e26df8ee4f0a4809cc57d8028826b344ce
2195
2016-06-06T22:00:52Z
SRogers
8
Created page with "This wiki site is maintained by the Swarm Development Group (SDG). This area of the wiki serves as SDG's home page. SDG is currently an all-volunteer organization. It takes a..."
wikitext
text/x-wiki
This wiki site is maintained by the Swarm Development Group (SDG). This area of the wiki serves as SDG's home page.
SDG is currently an all-volunteer organization. It takes a significant effort to maintain the wiki, maintain and improve Swarm, and provide user support. Please volunteer a little of your time to help...contact us via email or talk to us at SwarmFest.
See the menu at the right for links to information on becoming and SDG member, SDG's charter and corporate documents, a list of the members and officers of SDG's board of directors, and contact information.
Mission Statement
The Swarm Development Group (SDG) was founded in September 1999 as a private, not-for-profit [501c(3)] organization to support the development of the Swarm Simulation System (Swarm) and the interests of the group members. The purposes of the SDG are to:
# advance the state-of-the-art in multi agent based simulation through the continued advancement of the Swarm Simulation System and support of the Swarm user community
# promote the free interchange of multi agent based simulations among computing specialists and the public
# develop and maintain the integrity and competence of individuals engaged in the practice of agent based simulation.
Supporting Swarm Development Group and Swarm
SDG is funded by member contributions and its SwarmFest conferences. Currently, SDG has no paid staff and all work on the wiki and Swarm is done via volunteers and occasional contracts. If you use this wiki, and especially if you use Swarm, you should join SDG and contribute time or funding. Put an SDG membership in your project budget and see our membership page for how to contribute it.
Membership list
A list of current and former members of SDG is here:
SDG Members
a4db191ca7ded16b3c7683404c568c68b2b89032
Swarm FAQ
0
4
10
2015-03-07T05:23:14Z
Pauljohn32
1
Created page with "===How do I use the gcc profiler?=== A "profiler" is a system to tell you how much execution time your processor spends in each part of your code (and in which parts..."
wikitext
text/x-wiki
===How do I use the gcc profiler?===
A "profiler" is a system to tell you how much execution time your processor spends in each part of your code (and in which parts of the Swarm libraries and the run-time system). The gcc compiler used for Objective-C Swarm models includes a profiling option that is easy and often very helpful to use when you are trying to make a model run faster, or trying to figure out exactly what it is doing.
Using the gcc profiler requires (a) compiling the code with a special option, (b) running the model, and (c) using a special program that reports profiling results.
*You need to compile and link all parts of model using the gcc compiler option "-pg". (Do not also use the "-g" option; the profiler output will not be produced.) You can do this by inserting a couple lines into your makefile--the last two lines in the following example:
...
APPLICATION=template
OBJECTS=main.o Counter.o TemplateModelSwarm.o TemplateObserverSwarm.o EcoAverager.o Critter.o
APPLIBS= include $(SWARMHOME)/etc/swarm/Makefile.appl
CFLAGS+=-pg
EXTRACPPFLAGS+=-pg
...
*Then use "make clean" and "make" to completely recompile your code. This makes what is called an ''instrumented'' executable, which includes the extra code to report profiling information.
*Next, run the instrumented executable just as you would normally run your model. The profiler writes a file "gmon.out" into your directory.
*Finally, use the built-in program "gprof" to interpret gmon.out and produce the profiling report. Just use the command:
gprof mycode.exe
where "mycode.exe" is the name of your executable. gprof writes a table of profiling results; it's best to pipe its output to a file:
gprof mycode.exe > profileoutput.txt
The following example output is from a Swarm implementation of the famous "Boids" model:
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls us/call us/call name
24.03 0.62 0.62 21624597 0.03 0.03 _i_Vector__getLength
23.84 1.24 0.61 _fu40__Member
9.30 1.48 0.24 13726341 0.02 0.02 _i_Vector__sub_
6.20 1.64 0.16 3867902 0.04 0.12 _i_Vector__angle_
5.43 1.77 0.14 35699811 0.00 0.00 _i_Vector__getY
5.43 1.92 0.14 13782653 0.01 0.02 _i_Vector__init_
4.84 2.04 0.12 _fu37___obj_scratchZone
4.65 2.16 0.12 35744897 0.00 0.00 _i_Vector__getX
4.26 2.27 0.11 objc_msg_lookup
3.10 2.35 0.08 15654110 0.01 0.01 _i_SimObject__getPosition
2.71 2.42 0.07 4139991 0.02 0.02 _i_Vector__add_
2.71 2.49 0.07 3867902 0.02 0.03 _i_Vector__dot_
1.16 2.52 0.03 1972908 0.02 0.02 _i_SimObject__getObjectType
You can see that the method using up the most time is "getLength" in the model's class "Vector". This is not surprising because this method uses the function "sqrt" which is computationally demanding (because it uses a Taylor Series expansion to estimate the square root). If you wanted to speed the model up, you could replace "sqrt" with your own code to provide a rougher, faster estimate of the square root.
(Almost as much time is used up in class "fu40" which must be a run-time system function that you can't do anything about.)
--[[User:SFRailsback|SFRailsback]] 20:34, 23 Feb 2007 (EST); Thanks to Steve Jackson.</field>
90285b057a196f2b8e18640cb575a51cabb92f97
Swarm and MinGW
0
3
2214
2213
2017-11-16T18:06:29Z
Railsback
2
/* MinGW */
wikitext
text/x-wiki
= Overview =
This documentation provides information on how to use Swarm on Windows with [http://www.mingw.org MinGW] compilers. The following topics will be covered:
* How to run a Swam model compiled with MinGW on Windows: Once you produce a Swarm model using MinGW (or someone gives one to you), how do you run it on other machines without installing Swarm there?
* How to use MinGW to compile your own Swarm models, either during model development or so you can distribute working models to others. This requires installing MinGW and our binary Swarm libraries.
* How to package a model compiled with MinGW so it can be installed and run by itself on Windows machines.
* How to use MinGW to compile the Swarm libraries, in case you want to build your own Swarm binaries.
Each topic is more difficult than the one before it. However the topics are independent in that it is not necessary to know how to compile the Swarm library in order to run a pre-compiled Swarm model or compile your own model against a pre-compiled version of Swarm.
= Using Swarm Models Compiled with MinGW =
A model that has been compiled using MinGW can be installed and run from a Windows computer without installing MinGW or Swarm. An example code is this build of Heatbugs:
[http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe]
However, running a Swarm model requires some support programs and libraries. These are available as
<tt>swarm-2.4.1-win32.zip</tt>, available here:
[http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip]
Unzipping that file will create a folder called <tt>swarm</tt> which should be moved somewhere that is easy to remember. The rest of this tutorial will assume this Swarm folder has been placed at <tt>C:\swarm</tt>.
Before a Swarm model can be run, the <tt>swarm\bin</tt> folder must be added to the Windows <tt>PATH</tt> so that Heatbugs can find necessary libraries when it runs. The <tt>swarm\bin</tt> folder can be ''temporarily'' added to the path by executing the following in the Windows command line (the command line is accessed using the program <tt>cmd.exe</tt>):
<pre>path=%PATH%;C:\swarm\bin</pre>
However, it is possible to have conflicts if other versions of libraries used by Swarm, such as HDF5, are already installed and in your path. And some Swarm programs require that the environment variable SWARMHOME be defined, which will typically not be true. These problems can be avoided by using the following statements instead of the above path command:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%</pre>
You can alternatively add the Swarm folder to your <tt>PATH</tt> permanently by editing the Windows PATH environment variable. A tool like [[#RapidEE|RapidEE]] makes doing so easy, or you can use use Windows control panel > System > Advanced > Environment Variables to add <tt>swarm\bin</tt> to the PATH system variable.
Once the path has been set to include the <tt>swarm\bin</tt> folder, Swarm models can be started through the Windows command line, or by double-clicking on them from the Windows Explorer.
The Heatbugs model can now be run by changing the directory of the command line to the folder holding <tt>heatbugs.exe</tt> and then executing the program. For example, if <tt>heatbugs.exe</tt> is located in <tt>C:\Users\example_user\Downloads</tt>, then the model may be run as follows:
<pre>cd C:\Users\example_user\Downloads
heatbugs.exe</pre>
(or you can just double-click on <tt>heatbugs.exe</tt> from Windows Explorer, which temporarily opens a Windows command terminal while the model runs.)
[[Image:Running_Heatbugs.png|frame|none|alt=Running the Heatbugs model]]
You can also create a simple Windows batch file that sets SWARMHOME and the path and then executes the model. Create a file called, for example <tt>heatbugs.bat</tt> in the same directory where <tt>heatbugs.exe</tt> is, containing these lines:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%
heatbugs.exe</pre>
Then, just double-clicking on <tt>heatbugs.bat</tt> will start the model.
If you try this and get an error that some .dll file is not found, then the problem is likely that the path is not set correctly to include the swarm\bin folder. If instead the program crashes without an error statement, then the problem is more likely that SWARMHOME needs to be set.
= Installing Swarm and MinGW to compile models =
To compile Swarm models from source using MinGW, the following simple steps need to be taken to set up the build environment:
* [[#MinGW|Install MinGW using instructions here]]. Currently only 32-bit MinGW can be used with Swarm. Install all components of MinGW.
* Download compiled Swarm binaries, archived as [http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip swarm-2.4.1-win32.zip]. Unzip the archive and place the extracted folder at <tt>C:\swarm</tt>.
'''NOTE:'''
The archived Swarm binaries '''MUST''' be placed at <tt>C:\swarm</tt> to successfully compile Swarm models. This is because some paths had to be hard-coded by <tt>libtool</tt> during the creation of the binaries.
The final step before you can compile a Swarm model is to set the <tt>SWARMHOME</tt> environment variable so that the "make" program knows where to find the Swarm libraries when compiling your code. There are several ways to do this.
*You can temporarily set SWARMHOME by entering this command in the MinGW shell: <pre>export SWARMHOME=/c/swarm</pre>
*You can edit your Makefile so it starts with: <pre>SWARMHOME=/c/swarm</pre>
*Set SWARMHOME permanently as a Windows environment variable, either by using [[#RapidEE|RapidEE]] or Windows control panel > System > Advanced > Environment Variables to add a new (User or System) variable called SWARMHOME with the value <tt>/c/swarm</tt>.
After MinGW has been installed and the Swarm binaries have been downloaded, Swarm models may be compiled using the MinGW shell. Start up the program MinGW Shell, cd to the directory containing your code and Makefile, and enter the command "Make".
An archive of official Swarm example programs can be downloaded from:
[http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
We will use the "Heatbugs" model as an example of how to compile a Swarm application:
<pre>tar xzf /path/to/downloaded/swarmapps-2.3.0.tar.gz
cd swarmapps-2.3.0/objc/heatbugs
make</pre>
'''VERY IMPORTANT NOTE: MinGW produces two executables called <tt>heatbugs.exe</tt>---one in the <tt>heatbugs</tt> folder and another in the <tt>heatbugs/.libs</tt> folder. You should ignore the executable in the top-level folder, <tt>heatbugs/heatbugs.exe</tt>, as it is merely a compiled wrapper script that executes <tt>heatbugs/.libs/heatbugs.exe</tt>. When distributing compiled models, only use binaries from the <tt>.libs</tt> folder.'''
The resulting executable, <tt>.libs/heatbugs.exe</tt> may be executing by following the steps described above at ''Using Swarm Models Compiled with MinGW''. These steps must include setting the Windows Path to include <tt>C:\swarm\bin</tt>.
= Distributing a Swarm Model for Windows Users =
A major benefit of the MinGW version of Swarm is that models can be distributed for people to use without installing Swarm. A simple way to do this, after the model has been compiled and tested using methods in the previous section, is to create a ZIP archive that contains all the files to run the model.
* Create a directory tree that includes the Swarm binary files. For example, create C:\MySwarmModel and add the Swarm binaries (as described [[Swarm_and_MinGW#Using_Swarm_Models_Compiled_with_MinGW|above]]) to it as a subdirectory tree.
* Create another subdirectory that includes just the compiled model.
* Create a third subdirectory that includes any input files that the model needs and a batch file that sets the path and executes the model.
* Zip the whole tree up for distribution.
The directory tree in the zip file looks like this:
<pre>
C:\MySwarmModel\swarm
\bin
\etc
\include
\lib
\man
\share
\executable\MySwarmModel.exe
\Runfiles\MySwarmModel.bat (and any input files)
</pre>
where the file <tt>MySwarmModel.bat</tt> contains:
<pre>
set SWARMHOME=C:\MySwarmModel\swarm
path=%SWARMHOME%\bin;%PATH%
C:\MySwarmModel\executable\MySwarmModel.exe
</pre>
Then users can run the model just by double-clicking on <tt>MySwarmModel.bat</tt>.
= Building Swarm Using MinGW =
This tutorial provides directions and code for compiling your own Swarm libraries for Windows. It is a bit advanced---some familiarity with compiling software from source in a Linux environment and knowledge of the UNIX command line is assumed.
== Install Required Tools ==
The first step is to download and install tools required for compiling Swarm. These links provide directions:
* [[#MinGW|MinGW]]
* [[#Emacs|Emacs]]
* [[#GPerf|GPerf]]
== Build Support Libraries ==
The next steps are to build and install the libraries that Swarm depends on. A ZIP archive containing all the source code required can be found at:
[http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip]
This archive contains two subdirectories:
* sources: This folder contains the source code for each component.
* patches: This folder contains patchfiles that modfy source code so that MinGW can compile it.
After downloading and extracting the source code archive, open up a MinGW shell and run the following commands:
<pre>cd /path/to/where/swarm/source/was/extracted
mkdir build</pre>
The following steps will all assume your MinGW shell is operating out of the <tt>build</tt> directory. All compiled software will be installed to <tt>/c/swarm</tt> (The Windows Explorer will see the folder appear at <tt>C:\swarm</tt>).
=== ZLib ===
ZLib will be the first library to be built as it is a common dependency for many of the other software components. From the <tt>build</tt> directory, execute the following to build Zlib:
<pre>tar xzf ../sources/zlib-1.2.5.tar.gz
cd zlib-1.2.5
make -f win32/Makefile.gcc</pre>
And then the following commands to install ZLib to <tt>/c/swarm</tt>:
<pre>mkdir -p /c/swarm/bin
mkdir -p /c/swarm/include
mkdir -p /c/swarm/lib
cp zlib1.dll /c/swarm/bin/
cp zconf.h zlib.h /c/swarm/include/
mv libzdll.a libz.dll.a
cp *.a /c/swarm/lib</pre>
=== LibPNG ===
LibPNG will be built next as its only dependency is ZLib. From the <tt>build</tt> directory, execute the following steps to build and install LibPNG:
<pre>tar xjf ../sources/libpng-1.5.4.tar.bz2
cd libpng-1.5.4
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm --with-zlib-prefix=/c/swarm
make
make install</pre>
=== XPM ===
Starting from the <tt>build</tt> directory, the XPM library can be built and installed as follows:
<pre>tar xjf ../sources/xpm-nox-4.2.0.tar.bz2
cd xpm-nox-4.2.0
patch -p1 < ../../patches/xpm-nox-4.2.0-mingw-tcl.patch
make CC=gcc
make install prefix=/c/swarm</pre>
'''Summary of patchfile changes:'''
The patchfile is inherited from the SUSE builds of XPM for MinGW and adds Makefiles and other critical components.
One major modification has been made to the SUSE patchfile---<tt>tcl.h</tt> is included in <tt>xpm.h</tt>. This is required in order to use XPM while Tk is installed. Conversely, this means that this build of XPM cannot be used without having Tk installed.
=== LibFFI ===
Starting from the <tt>build</tt> directory, LibFFI can be built and installed as follows:
<pre>tar xzf ../sources/libffi-3.0.9.tar.gz
cd libffi-3.0.9
./configure --prefix=/c/swarm
make
make install</pre>
The LibFFI headers get installed in a weird place.
<pre>mv /c/swarm/lib/libffi-3.0.9/include/*.h /c/swarm/include
rm -rf /c/swarm/lib/libffi-3.0.9</pre>
=== Tcl ===
Starting from the <tt>build</tt> directory, Tcl can be built and installed as follows:
<pre>tar xzf ../sources/tcl8.4.19-src.tar.gz
cd tcl8.4.19
patch -p1 < ../../patches/tcl-8.4.19-fix-lvalues.patch
cd win
./configure --prefix=/c/swarm
make
make install</pre>
'''Summary of patchfile changes:'''
At two places in the TCL source code, an assignment is made while simultaneously performing a typecast. The typecast and the assignment had to be split into separate operations in order to be acceptable to the MinGW compilers.
=== Tk ===
Starting from the <tt>build</tt> directory, Tk can be built and installed as follows:
<pre>tar xzf ../sources/tk8.4.19-src.tar.gz
cd tk8.4.19/win
./configure --prefix=/c/swarm
make
make install</pre>
=== BLT ===
Starting from the <tt>build</tt> directory, BLT can be built and installed as follows:
<pre>tar xzf ../sources/BLT2.4z.tar.gz
cd blt2.4z
./configure --prefix=/c/swarm --without-x
make
make install</pre>
=== HDF5 (Optional) ===
Getting HDF5 to work with MinGW is a little tricky. It is an optional dependency, so if support for reading and writing <tt>.hdf</tt> files is not needed this section can be skipped.
As of version 1.8.7, HDF5 currently does not compile under MinGW. So, we must wrap pre-compiled binaries for use with MinGW. In order to wrap the binaries, we will need an additional tool called <tt>pexports</tt>. This can be installed using <tt>mingw-get</tt>:
<pre>mingw-get install mingw-utils</pre>
Download 32-bit Windows binaries from the HDF website compiled for use with the Visual Studio compilers (these files have "VS" listed under the ''Compilers'' section). After extracting the archive, the HDF5 libraries can be wrapped for use with MinGW by executing the following commands:
<pre>cd path/to/where/HDF5/was/extracted
for dll in `ls dll/*dll`; do
def_file=`basename $dll .dll`.def
lib_file=lib`basename $dll dll.dll`.a
pexports $dll > $def_file
dlltool -d $def_file -l lib/$lib_file
done</pre>
Next, move the libraries and header files needed to use HDF5 from C into <tt>C:\swarm</tt>:
<pre>cp dll/hdf5dll.dll dll/szip.dll /c/swarm/bin
cp include/* /c/swarm/include
cp lib/libhdf5.a /c/swarm/lib</pre>
Finally, a patch must be applied to the HDF header file <tt>H5public.h</tt> so that it doesn't define <tt>ssize_t</tt>---a constant already defined by MinGW. The required patch is contained in the Swarm MinGW source archive:
<pre>cd /path/to/where/swarm/source/was/extracted
patch -p1 -d /c/swarm < patches/hdf5-1.8.7-mingw.patch</pre>
== Build Swarm ==
Finally, the Swarm libraries themselves can be built. From the <tt>build</tt> directory, execute the following
<pre>tar xzf ../sources/swarm-2.4.1.tar.gz
cd swarm-2.4.1
patch -p1 ../../patches/swarm-2.4.1-mingw.patch
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm \
--with-zlibdir=/c/swarm \
--with-pngdir=/c/swarm \
--with-xpmdir=/c/swarm \
--with-ffidir=/c/swarm \
--with-tcl=/c/swarm/lib \
--with-tk=/c/swarm/lib \
--with-bltdir=/c/swarm
cd avcall
gcc -S avcall-i386.c
cd ..
make
make install</pre>
If you wrapped HDF5 up for use with MinGW, add <tt>--with-hdf5dir=/c/swarm</tt> to the list of arguments passed to <tt>configure</tt>.
'''Summary of patchfile changes:'''
<tt>swarm-2.4.1-mingw.patch</tt> modifies the Swarm source code in the following ways:
* <tt>gettimeofday</tt> is no longer defined in the Swarm sources as MinGW includes this function in its standard library.
* Swarm GUI functions are updated to be compatible with LibPNG 1.5.
* The Swarm <tt>configure</tt> script defines <tt>DATADIR</tt> as a preprocessor macro---this conflicts with variables in the GCC Objective-C library. <tt>DATDIR</tt> is <tt>undef</tt>ed in critical parts of the source code.
* The <tt>sleep</tt> function is aliased to <tt>usleep</tt>---which is the name of the MinGW implementation.
* The way in which Makefiles invoke <tt>gperf</tt> is amended so that it actually produces output.
* NULL checks are added to `zstrdup` in src/defobj/internal.m. Some functions in the Swarm library may attempt to call `zstrdup` on a NULL pointer. (This happens if the SWARMHOME environment variable is not set.) Failing to check for this condition can lead to segfaults. `zstrdup` now returns NULL if passed a NULL string or if `alloc` fails to allocate memory for a duplicate.
Full details are contained in the patchfile.
= Tools =
== MinGW ==
'''Homepage:''' http://www.mingw.org
'''Current versions of MinGW include a compiler version (gcc 6.x) that is incompatible with Swarm.''' Swarm needs a version no newer than 4.6. '''IF you use a current version of MinGW your Swarm code may compile but then produce incorrect results.''' You can find on the web (a) instructions for replacing the gcc in MinGW with an older version, and (b) old versions of MinGW that contain older gcc versions. However, some of us have not had success with either of those options. At least temporarily, there is a version of MinGW that works in Windows 10 and with Swarm, [http://www.langrailsback.com/SwarmVM/ available here].
'''Version Used:''' 20110530
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
[http://www.mingw.org MinGW] is a set of software that aims to provide an environment where software developed on UNIX-like systems can be easily compiled for Windows. Since Swarm is primarily developed on Linux (a UNIX clone), MinGW can ease the task of creating Swarm models that run on Windows.
MinGW is similar to the [http://www.cygwin.org Cygwin] project. The major difference is that MinGW produces executables that depend only on native Windows libraries while Cygwin executables require special compatibility libraries that are part of the Cygwin distribution.
=== Installing MinGW ===
MinGW can be installed by downloading the "Automated MinGW Installer", which usually has a name like <tt>mingw-get-inst-<date>.exe</tt> where <tt><date></tt> is the datestamp for when the installer was packaged. Running this executable will start the installation process. The installer lets you select which optional components to install; make sure all boxes are checked so you '''install all components'''.
[[Image:MinGW_Setup.png|frame|none|alt=Install all available MinGW components]]
The installer downloads all components from the internet. This will take a while, so have a cup of coffee or walk the dog.
See the following section about also installing an optional, more-functional shell window for MinGW.
=== Using MinGW ===
The MinGW compilers are accessible through the "MinGW Shell" which should be located under the MinGW folder in the Start Menu:
[[Image:MinGW_Shell.png|frame|none|alt=Location of MinGW Shell]]
or by running <tt>C:\MinGW\msys\1.0\msys.bat</tt> (if MinGW was installed to its default location).
By default the MinGW shell executes inside of a Windows <tt>cmd.exe</tt> terminal. There are a couple major drawbacks to this:
* You cannot resize the window to full-screen.
* The shell provides limited history scrollback.
MinGW provides a couple of alternative terminals for the MinGW shell which do not have these drawbacks; one of which is called MinTTY. To install MinTTY execute the following in a MinGW shell:
<pre>mingw-get install mintty</pre>
Then the <tt>mintty</tt> command can be used to launch a MinTTY terminal. The MinGW Shell can also be set to launch MinTTY by default by editing the file <tt>C:\MinGW\msys\1.0\msys.bat</tt> and changing the following line (approximately line 58):
<pre>if "x%MSYSCON%" == "xunknown" set MSYSCON=sh.exe</pre>
to:
<pre>if "x%MSYSCON%" == "xunknown" set MSYSCON=mintty.exe</pre>
=== A Note About Paths ===
The MinGW Shell emulates a UNIX <tt>bash</tt> shell and thus uses UNIX-style paths, <tt>/path/to/file</tt>, instead of Windows-style paths, <tt>C:\path\to\file</tt>. One peculiarity of this process is that the shell must deal with the fact that Windows filesystems have multiple roots (<tt>C:</tt>, <tt>D:</tt>, etc.) while a UNIX filesystem only has one root called <tt>/</tt>. The way this is reconciled by the <tt>bash</tt> shell provided with MinGW is that <tt>/c</tt> refers to the root of the <tt>C:</tt> drive, <tt>/d</tt> refers to the root of the <tt>D:</tt> drive and so on and so forth.
The root of the filesystem itself, <tt>/</tt>, also has some caveats. <tt>/</tt> refers to the <tt>mysy</tt> folder, <tt>C:/MinGW/mysys/1.0</tt> in a default installation. <tt>/usr</tt> also refers to the same location. Thus, <tt>/usr/local</tt> and <tt>/local</tt> both refer to <tt>C:/MinGW/mysys/1.0/local</tt>.
=== A Note About MinGW-64 ===
Currently Swarm has been developed and tested against the 32-bit version of MinGW. Hence Swarm models produced this way should run in any version of Windows.
The [MinGW-w64][mingw_65] project produces 64-bit MinGW compilers that can produce 64-bit executables that will only run on 64-bit versions of Windows. These executables benefit from:
* Access to more memory. A 32-bit executable will only be able to allocate ~3 GB of RAM---even if the system has more RAM available.
* Possibly quicker execution speeds due to matching the native architecture of the operating system---however this depends on the types of tasks that the program executes. It has been reported that 64 bit Swarm executables run quicker than 32 bit Swarm executables on Linux.
Currently, no attempt has been made to compile Swarm 2.4.1 with the 64 bit MinGW compilers. If a successful attempt is made, please report it on the [http://www.swarm.org/mailman/listinfo/support Swarm mailing list].
== Emacs ==
'''Homepage:''' http://www.gnu.org/software/emacs
'''Version Used:''' 23.3
'''Download Area:''' http://ftp.gnu.org/gnu/emacs/windows
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GNU Emacs is a text editor that is used by many programmers to edit code. However, Emacs can also be scripted to perform a variety of complicated transformations on text files. The scripts that build the Swarm libraries use Emacs to automate the process of generating some source files. Thus Emacs has to be installed in order to build Swarm from source.
=== Installing Emacs ===
Install Emacs by downloading one of the <tt>emacs-<version
number>-bin-i386.zip</tt> files from the download area. Don't use any of the
files containing <tt>barebin</tt>. After extracting the ZIP archive there will
be an Emacs folder containing a subfolder called <tt>bin</tt>. Add this folder
to your Windows <tt>PATH</tt>. [[#RapidEE|RapidEE]] can help edit the
<tt>PATH</tt> variable.
== GPerf ==
'''Homepage:''' http://www.gnu.org/software/gperf/
'''Download Area:''' http://sourceforge.net/projects/gnuwin32/files/gperf
'''Version Used:''' 3.0.1
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GPerf is a program that produces C code containing hash functions. The scripts
that build the Swarm libraries use GPerf to generate some source code files.
Download <tt>gperf.exe</tt> from the GnuWin32 site on Sourceforge and place it
somewhere on your Windows <tt>PATH</tt>. Again, [[#RapidEE|RapidEE]] can help set the <tt>PATH</tt> variable.
== RapidEE ==
'''Homepage:''' http://www.rapidee.com
'''Version Used:''' 5.0
'''License:''' [http://www.rapidee.com/en/license Freeware]
The Rapid Environment Editor (RapidEE) is a spiffy tool that makes it easy to inspect and alter the value of Windows environment variables, such as the <tt>PATH</tt>. RapidEE may be used to edit "System Variables" which will affect all user accounts or "User Variables" which will affect just the current account. Administrative privileges may be required to edit the System Variables.
[[Image:RapidEE_1.png|frame|none|alt=The different variables RapidEE can edit]]
Right-clicking on the <tt>Path</tt> variable in the System Variables or User Variables will bring up a menu that presents the option to "Add value":
[[Image:RapidEE_2.png|frame|none|alt=Adding a new value to the PATH]]
Once the new entry has been added, RapidEE must be told to save the changes. Command line shells, such as <tt>cmd.exe</tt>, must be restarted in order for them to notice the changes.
[[Image:RapidEE_3.png|frame|none|alt=Adding and saving a value]]
== Depends ==
'''Homepage:''' http://www.dependencywalker.com/
'''Version Used:''' 2.2
'''License:''' Freeware
Depends is a usefull utility that scans Windows executables and reports information concerning the Dynamic-link Libraries (DLLs) that those executables require in order to run.
= Software Used to Compile Swarm 2.4.1 =
{|
! Name
! Verson Used
! License
! Homepage
! Download Area
|-
| ZLib
| 1.2.5
| [http://www.opensource.org/licenses/Zlib ZLib/PNG License]
| [http://www.zlib.net http://www.zlib.net]
| --
|-
| LibFFI
| 3.0.9
| [http://www.opensource.org/licenses/MIT MIT]
| [http://sourceware.org/libffi http://sourceware.org/libffi]
| --
|-
| LibPNG
| 1.5.4
| [http://www.opensource.org/licenses/Zlib ZLib/PNG]
| [http://www.libpng.org/pub/png/libpng.html http://www.libpng.org/pub/png/libpng.html]
| --
|-
| XPM-NoX
| 4.2.0
| [http://www.opensource.org/licenses/MIT MIT]
| unknown
| Try: [http://gnuwin32.sourceforge.net/packages/xpm-nox.htm http://gnuwin32.sourceforge.net/packages/xpm-nox.htm]
|-
| Tcl
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| Tk
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| BLT
| 2.4z
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://blt.sourceforge.net http://blt.sourceforge.net]
| --
|-
| HDF5
| 1.8.7
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://www.hdfgroup.org/HDF5 http://www.hdfgroup.org/HDF5]
| --
|-
| Swarm
| 2.4.1
| [http://www.opensource.org/licenses/GPL-3.0 GPL]
| [https://savannah.nongnu.org/projects/swarm/ https://savannah.nongnu.org/projects/swarm/]
| [http://download.savannah.gnu.org/releases/swarm/src/swarm/swarm-2.4.1.tar.gz http://download.savannah.gnu.org/releases/swarm/src/swarm/swarm-2.4.1.tar.gz]
|}
a2ce440448c7d7fc33ca75b64b5230a0a2c24656
2213
2212
2017-11-16T00:44:55Z
Railsback
2
/* MinGW */
wikitext
text/x-wiki
= Overview =
This documentation provides information on how to use Swarm on Windows with [http://www.mingw.org MinGW] compilers. The following topics will be covered:
* How to run a Swam model compiled with MinGW on Windows: Once you produce a Swarm model using MinGW (or someone gives one to you), how do you run it on other machines without installing Swarm there?
* How to use MinGW to compile your own Swarm models, either during model development or so you can distribute working models to others. This requires installing MinGW and our binary Swarm libraries.
* How to package a model compiled with MinGW so it can be installed and run by itself on Windows machines.
* How to use MinGW to compile the Swarm libraries, in case you want to build your own Swarm binaries.
Each topic is more difficult than the one before it. However the topics are independent in that it is not necessary to know how to compile the Swarm library in order to run a pre-compiled Swarm model or compile your own model against a pre-compiled version of Swarm.
= Using Swarm Models Compiled with MinGW =
A model that has been compiled using MinGW can be installed and run from a Windows computer without installing MinGW or Swarm. An example code is this build of Heatbugs:
[http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe]
However, running a Swarm model requires some support programs and libraries. These are available as
<tt>swarm-2.4.1-win32.zip</tt>, available here:
[http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip]
Unzipping that file will create a folder called <tt>swarm</tt> which should be moved somewhere that is easy to remember. The rest of this tutorial will assume this Swarm folder has been placed at <tt>C:\swarm</tt>.
Before a Swarm model can be run, the <tt>swarm\bin</tt> folder must be added to the Windows <tt>PATH</tt> so that Heatbugs can find necessary libraries when it runs. The <tt>swarm\bin</tt> folder can be ''temporarily'' added to the path by executing the following in the Windows command line (the command line is accessed using the program <tt>cmd.exe</tt>):
<pre>path=%PATH%;C:\swarm\bin</pre>
However, it is possible to have conflicts if other versions of libraries used by Swarm, such as HDF5, are already installed and in your path. And some Swarm programs require that the environment variable SWARMHOME be defined, which will typically not be true. These problems can be avoided by using the following statements instead of the above path command:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%</pre>
You can alternatively add the Swarm folder to your <tt>PATH</tt> permanently by editing the Windows PATH environment variable. A tool like [[#RapidEE|RapidEE]] makes doing so easy, or you can use use Windows control panel > System > Advanced > Environment Variables to add <tt>swarm\bin</tt> to the PATH system variable.
Once the path has been set to include the <tt>swarm\bin</tt> folder, Swarm models can be started through the Windows command line, or by double-clicking on them from the Windows Explorer.
The Heatbugs model can now be run by changing the directory of the command line to the folder holding <tt>heatbugs.exe</tt> and then executing the program. For example, if <tt>heatbugs.exe</tt> is located in <tt>C:\Users\example_user\Downloads</tt>, then the model may be run as follows:
<pre>cd C:\Users\example_user\Downloads
heatbugs.exe</pre>
(or you can just double-click on <tt>heatbugs.exe</tt> from Windows Explorer, which temporarily opens a Windows command terminal while the model runs.)
[[Image:Running_Heatbugs.png|frame|none|alt=Running the Heatbugs model]]
You can also create a simple Windows batch file that sets SWARMHOME and the path and then executes the model. Create a file called, for example <tt>heatbugs.bat</tt> in the same directory where <tt>heatbugs.exe</tt> is, containing these lines:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%
heatbugs.exe</pre>
Then, just double-clicking on <tt>heatbugs.bat</tt> will start the model.
If you try this and get an error that some .dll file is not found, then the problem is likely that the path is not set correctly to include the swarm\bin folder. If instead the program crashes without an error statement, then the problem is more likely that SWARMHOME needs to be set.
= Installing Swarm and MinGW to compile models =
To compile Swarm models from source using MinGW, the following simple steps need to be taken to set up the build environment:
* [[#MinGW|Install MinGW using instructions here]]. Currently only 32-bit MinGW can be used with Swarm. Install all components of MinGW.
* Download compiled Swarm binaries, archived as [http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip swarm-2.4.1-win32.zip]. Unzip the archive and place the extracted folder at <tt>C:\swarm</tt>.
'''NOTE:'''
The archived Swarm binaries '''MUST''' be placed at <tt>C:\swarm</tt> to successfully compile Swarm models. This is because some paths had to be hard-coded by <tt>libtool</tt> during the creation of the binaries.
The final step before you can compile a Swarm model is to set the <tt>SWARMHOME</tt> environment variable so that the "make" program knows where to find the Swarm libraries when compiling your code. There are several ways to do this.
*You can temporarily set SWARMHOME by entering this command in the MinGW shell: <pre>export SWARMHOME=/c/swarm</pre>
*You can edit your Makefile so it starts with: <pre>SWARMHOME=/c/swarm</pre>
*Set SWARMHOME permanently as a Windows environment variable, either by using [[#RapidEE|RapidEE]] or Windows control panel > System > Advanced > Environment Variables to add a new (User or System) variable called SWARMHOME with the value <tt>/c/swarm</tt>.
After MinGW has been installed and the Swarm binaries have been downloaded, Swarm models may be compiled using the MinGW shell. Start up the program MinGW Shell, cd to the directory containing your code and Makefile, and enter the command "Make".
An archive of official Swarm example programs can be downloaded from:
[http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
We will use the "Heatbugs" model as an example of how to compile a Swarm application:
<pre>tar xzf /path/to/downloaded/swarmapps-2.3.0.tar.gz
cd swarmapps-2.3.0/objc/heatbugs
make</pre>
'''VERY IMPORTANT NOTE: MinGW produces two executables called <tt>heatbugs.exe</tt>---one in the <tt>heatbugs</tt> folder and another in the <tt>heatbugs/.libs</tt> folder. You should ignore the executable in the top-level folder, <tt>heatbugs/heatbugs.exe</tt>, as it is merely a compiled wrapper script that executes <tt>heatbugs/.libs/heatbugs.exe</tt>. When distributing compiled models, only use binaries from the <tt>.libs</tt> folder.'''
The resulting executable, <tt>.libs/heatbugs.exe</tt> may be executing by following the steps described above at ''Using Swarm Models Compiled with MinGW''. These steps must include setting the Windows Path to include <tt>C:\swarm\bin</tt>.
= Distributing a Swarm Model for Windows Users =
A major benefit of the MinGW version of Swarm is that models can be distributed for people to use without installing Swarm. A simple way to do this, after the model has been compiled and tested using methods in the previous section, is to create a ZIP archive that contains all the files to run the model.
* Create a directory tree that includes the Swarm binary files. For example, create C:\MySwarmModel and add the Swarm binaries (as described [[Swarm_and_MinGW#Using_Swarm_Models_Compiled_with_MinGW|above]]) to it as a subdirectory tree.
* Create another subdirectory that includes just the compiled model.
* Create a third subdirectory that includes any input files that the model needs and a batch file that sets the path and executes the model.
* Zip the whole tree up for distribution.
The directory tree in the zip file looks like this:
<pre>
C:\MySwarmModel\swarm
\bin
\etc
\include
\lib
\man
\share
\executable\MySwarmModel.exe
\Runfiles\MySwarmModel.bat (and any input files)
</pre>
where the file <tt>MySwarmModel.bat</tt> contains:
<pre>
set SWARMHOME=C:\MySwarmModel\swarm
path=%SWARMHOME%\bin;%PATH%
C:\MySwarmModel\executable\MySwarmModel.exe
</pre>
Then users can run the model just by double-clicking on <tt>MySwarmModel.bat</tt>.
= Building Swarm Using MinGW =
This tutorial provides directions and code for compiling your own Swarm libraries for Windows. It is a bit advanced---some familiarity with compiling software from source in a Linux environment and knowledge of the UNIX command line is assumed.
== Install Required Tools ==
The first step is to download and install tools required for compiling Swarm. These links provide directions:
* [[#MinGW|MinGW]]
* [[#Emacs|Emacs]]
* [[#GPerf|GPerf]]
== Build Support Libraries ==
The next steps are to build and install the libraries that Swarm depends on. A ZIP archive containing all the source code required can be found at:
[http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip]
This archive contains two subdirectories:
* sources: This folder contains the source code for each component.
* patches: This folder contains patchfiles that modfy source code so that MinGW can compile it.
After downloading and extracting the source code archive, open up a MinGW shell and run the following commands:
<pre>cd /path/to/where/swarm/source/was/extracted
mkdir build</pre>
The following steps will all assume your MinGW shell is operating out of the <tt>build</tt> directory. All compiled software will be installed to <tt>/c/swarm</tt> (The Windows Explorer will see the folder appear at <tt>C:\swarm</tt>).
=== ZLib ===
ZLib will be the first library to be built as it is a common dependency for many of the other software components. From the <tt>build</tt> directory, execute the following to build Zlib:
<pre>tar xzf ../sources/zlib-1.2.5.tar.gz
cd zlib-1.2.5
make -f win32/Makefile.gcc</pre>
And then the following commands to install ZLib to <tt>/c/swarm</tt>:
<pre>mkdir -p /c/swarm/bin
mkdir -p /c/swarm/include
mkdir -p /c/swarm/lib
cp zlib1.dll /c/swarm/bin/
cp zconf.h zlib.h /c/swarm/include/
mv libzdll.a libz.dll.a
cp *.a /c/swarm/lib</pre>
=== LibPNG ===
LibPNG will be built next as its only dependency is ZLib. From the <tt>build</tt> directory, execute the following steps to build and install LibPNG:
<pre>tar xjf ../sources/libpng-1.5.4.tar.bz2
cd libpng-1.5.4
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm --with-zlib-prefix=/c/swarm
make
make install</pre>
=== XPM ===
Starting from the <tt>build</tt> directory, the XPM library can be built and installed as follows:
<pre>tar xjf ../sources/xpm-nox-4.2.0.tar.bz2
cd xpm-nox-4.2.0
patch -p1 < ../../patches/xpm-nox-4.2.0-mingw-tcl.patch
make CC=gcc
make install prefix=/c/swarm</pre>
'''Summary of patchfile changes:'''
The patchfile is inherited from the SUSE builds of XPM for MinGW and adds Makefiles and other critical components.
One major modification has been made to the SUSE patchfile---<tt>tcl.h</tt> is included in <tt>xpm.h</tt>. This is required in order to use XPM while Tk is installed. Conversely, this means that this build of XPM cannot be used without having Tk installed.
=== LibFFI ===
Starting from the <tt>build</tt> directory, LibFFI can be built and installed as follows:
<pre>tar xzf ../sources/libffi-3.0.9.tar.gz
cd libffi-3.0.9
./configure --prefix=/c/swarm
make
make install</pre>
The LibFFI headers get installed in a weird place.
<pre>mv /c/swarm/lib/libffi-3.0.9/include/*.h /c/swarm/include
rm -rf /c/swarm/lib/libffi-3.0.9</pre>
=== Tcl ===
Starting from the <tt>build</tt> directory, Tcl can be built and installed as follows:
<pre>tar xzf ../sources/tcl8.4.19-src.tar.gz
cd tcl8.4.19
patch -p1 < ../../patches/tcl-8.4.19-fix-lvalues.patch
cd win
./configure --prefix=/c/swarm
make
make install</pre>
'''Summary of patchfile changes:'''
At two places in the TCL source code, an assignment is made while simultaneously performing a typecast. The typecast and the assignment had to be split into separate operations in order to be acceptable to the MinGW compilers.
=== Tk ===
Starting from the <tt>build</tt> directory, Tk can be built and installed as follows:
<pre>tar xzf ../sources/tk8.4.19-src.tar.gz
cd tk8.4.19/win
./configure --prefix=/c/swarm
make
make install</pre>
=== BLT ===
Starting from the <tt>build</tt> directory, BLT can be built and installed as follows:
<pre>tar xzf ../sources/BLT2.4z.tar.gz
cd blt2.4z
./configure --prefix=/c/swarm --without-x
make
make install</pre>
=== HDF5 (Optional) ===
Getting HDF5 to work with MinGW is a little tricky. It is an optional dependency, so if support for reading and writing <tt>.hdf</tt> files is not needed this section can be skipped.
As of version 1.8.7, HDF5 currently does not compile under MinGW. So, we must wrap pre-compiled binaries for use with MinGW. In order to wrap the binaries, we will need an additional tool called <tt>pexports</tt>. This can be installed using <tt>mingw-get</tt>:
<pre>mingw-get install mingw-utils</pre>
Download 32-bit Windows binaries from the HDF website compiled for use with the Visual Studio compilers (these files have "VS" listed under the ''Compilers'' section). After extracting the archive, the HDF5 libraries can be wrapped for use with MinGW by executing the following commands:
<pre>cd path/to/where/HDF5/was/extracted
for dll in `ls dll/*dll`; do
def_file=`basename $dll .dll`.def
lib_file=lib`basename $dll dll.dll`.a
pexports $dll > $def_file
dlltool -d $def_file -l lib/$lib_file
done</pre>
Next, move the libraries and header files needed to use HDF5 from C into <tt>C:\swarm</tt>:
<pre>cp dll/hdf5dll.dll dll/szip.dll /c/swarm/bin
cp include/* /c/swarm/include
cp lib/libhdf5.a /c/swarm/lib</pre>
Finally, a patch must be applied to the HDF header file <tt>H5public.h</tt> so that it doesn't define <tt>ssize_t</tt>---a constant already defined by MinGW. The required patch is contained in the Swarm MinGW source archive:
<pre>cd /path/to/where/swarm/source/was/extracted
patch -p1 -d /c/swarm < patches/hdf5-1.8.7-mingw.patch</pre>
== Build Swarm ==
Finally, the Swarm libraries themselves can be built. From the <tt>build</tt> directory, execute the following
<pre>tar xzf ../sources/swarm-2.4.1.tar.gz
cd swarm-2.4.1
patch -p1 ../../patches/swarm-2.4.1-mingw.patch
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm \
--with-zlibdir=/c/swarm \
--with-pngdir=/c/swarm \
--with-xpmdir=/c/swarm \
--with-ffidir=/c/swarm \
--with-tcl=/c/swarm/lib \
--with-tk=/c/swarm/lib \
--with-bltdir=/c/swarm
cd avcall
gcc -S avcall-i386.c
cd ..
make
make install</pre>
If you wrapped HDF5 up for use with MinGW, add <tt>--with-hdf5dir=/c/swarm</tt> to the list of arguments passed to <tt>configure</tt>.
'''Summary of patchfile changes:'''
<tt>swarm-2.4.1-mingw.patch</tt> modifies the Swarm source code in the following ways:
* <tt>gettimeofday</tt> is no longer defined in the Swarm sources as MinGW includes this function in its standard library.
* Swarm GUI functions are updated to be compatible with LibPNG 1.5.
* The Swarm <tt>configure</tt> script defines <tt>DATADIR</tt> as a preprocessor macro---this conflicts with variables in the GCC Objective-C library. <tt>DATDIR</tt> is <tt>undef</tt>ed in critical parts of the source code.
* The <tt>sleep</tt> function is aliased to <tt>usleep</tt>---which is the name of the MinGW implementation.
* The way in which Makefiles invoke <tt>gperf</tt> is amended so that it actually produces output.
* NULL checks are added to `zstrdup` in src/defobj/internal.m. Some functions in the Swarm library may attempt to call `zstrdup` on a NULL pointer. (This happens if the SWARMHOME environment variable is not set.) Failing to check for this condition can lead to segfaults. `zstrdup` now returns NULL if passed a NULL string or if `alloc` fails to allocate memory for a duplicate.
Full details are contained in the patchfile.
= Tools =
== MinGW ==
'''Homepage:''' http://www.mingw.org
'''Now, for Swarm, you must use an older version of MinGW with compiler (gcc) version of 4.6.x or earlier.''' Search the web for a file like this x86_64-w64-mingw32-gcc-4.5.3-release-linux_rubenvb.tar.lzma and follow instructions for installing. '''IF you use a later version of MinGW (e.g., 6.x) your Swarm code may compile but then produce incorrect results.'''
'''Version Used:''' 20110530
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
[http://www.mingw.org MinGW] is a set of software that aims to provide an environment where software developed on UNIX-like systems can be easily compiled for Windows. Since Swarm is primarily developed on Linux (a UNIX clone), MinGW can ease the task of creating Swarm models that run on Windows.
MinGW is similar to the [http://www.cygwin.org Cygwin] project. The major difference is that MinGW produces executables that depend only on native Windows libraries while Cygwin executables require special compatibility libraries that are part of the Cygwin distribution.
=== Installing MinGW ===
MinGW can be installed by downloading the "Automated MinGW Installer", which usually has a name like <tt>mingw-get-inst-<date>.exe</tt> where <tt><date></tt> is the datestamp for when the installer was packaged. Running this executable will start the installation process. The installer lets you select which optional components to install; make sure all boxes are checked so you '''install all components'''.
[[Image:MinGW_Setup.png|frame|none|alt=Install all available MinGW components]]
The installer downloads all components from the internet. This will take a while, so have a cup of coffee or walk the dog.
See the following section about also installing an optional, more-functional shell window for MinGW.
=== Using MinGW ===
The MinGW compilers are accessible through the "MinGW Shell" which should be located under the MinGW folder in the Start Menu:
[[Image:MinGW_Shell.png|frame|none|alt=Location of MinGW Shell]]
or by running <tt>C:\MinGW\msys\1.0\msys.bat</tt> (if MinGW was installed to its default location).
By default the MinGW shell executes inside of a Windows <tt>cmd.exe</tt> terminal. There are a couple major drawbacks to this:
* You cannot resize the window to full-screen.
* The shell provides limited history scrollback.
MinGW provides a couple of alternative terminals for the MinGW shell which do not have these drawbacks; one of which is called MinTTY. To install MinTTY execute the following in a MinGW shell:
<pre>mingw-get install mintty</pre>
Then the <tt>mintty</tt> command can be used to launch a MinTTY terminal. The MinGW Shell can also be set to launch MinTTY by default by editing the file <tt>C:\MinGW\msys\1.0\msys.bat</tt> and changing the following line (approximately line 58):
<pre>if "x%MSYSCON%" == "xunknown" set MSYSCON=sh.exe</pre>
to:
<pre>if "x%MSYSCON%" == "xunknown" set MSYSCON=mintty.exe</pre>
=== A Note About Paths ===
The MinGW Shell emulates a UNIX <tt>bash</tt> shell and thus uses UNIX-style paths, <tt>/path/to/file</tt>, instead of Windows-style paths, <tt>C:\path\to\file</tt>. One peculiarity of this process is that the shell must deal with the fact that Windows filesystems have multiple roots (<tt>C:</tt>, <tt>D:</tt>, etc.) while a UNIX filesystem only has one root called <tt>/</tt>. The way this is reconciled by the <tt>bash</tt> shell provided with MinGW is that <tt>/c</tt> refers to the root of the <tt>C:</tt> drive, <tt>/d</tt> refers to the root of the <tt>D:</tt> drive and so on and so forth.
The root of the filesystem itself, <tt>/</tt>, also has some caveats. <tt>/</tt> refers to the <tt>mysy</tt> folder, <tt>C:/MinGW/mysys/1.0</tt> in a default installation. <tt>/usr</tt> also refers to the same location. Thus, <tt>/usr/local</tt> and <tt>/local</tt> both refer to <tt>C:/MinGW/mysys/1.0/local</tt>.
=== A Note About MinGW-64 ===
Currently Swarm has been developed and tested against the 32-bit version of MinGW. Hence Swarm models produced this way should run in any version of Windows.
The [MinGW-w64][mingw_65] project produces 64-bit MinGW compilers that can produce 64-bit executables that will only run on 64-bit versions of Windows. These executables benefit from:
* Access to more memory. A 32-bit executable will only be able to allocate ~3 GB of RAM---even if the system has more RAM available.
* Possibly quicker execution speeds due to matching the native architecture of the operating system---however this depends on the types of tasks that the program executes. It has been reported that 64 bit Swarm executables run quicker than 32 bit Swarm executables on Linux.
Currently, no attempt has been made to compile Swarm 2.4.1 with the 64 bit MinGW compilers. If a successful attempt is made, please report it on the [http://www.swarm.org/mailman/listinfo/support Swarm mailing list].
== Emacs ==
'''Homepage:''' http://www.gnu.org/software/emacs
'''Version Used:''' 23.3
'''Download Area:''' http://ftp.gnu.org/gnu/emacs/windows
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GNU Emacs is a text editor that is used by many programmers to edit code. However, Emacs can also be scripted to perform a variety of complicated transformations on text files. The scripts that build the Swarm libraries use Emacs to automate the process of generating some source files. Thus Emacs has to be installed in order to build Swarm from source.
=== Installing Emacs ===
Install Emacs by downloading one of the <tt>emacs-<version
number>-bin-i386.zip</tt> files from the download area. Don't use any of the
files containing <tt>barebin</tt>. After extracting the ZIP archive there will
be an Emacs folder containing a subfolder called <tt>bin</tt>. Add this folder
to your Windows <tt>PATH</tt>. [[#RapidEE|RapidEE]] can help edit the
<tt>PATH</tt> variable.
== GPerf ==
'''Homepage:''' http://www.gnu.org/software/gperf/
'''Download Area:''' http://sourceforge.net/projects/gnuwin32/files/gperf
'''Version Used:''' 3.0.1
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GPerf is a program that produces C code containing hash functions. The scripts
that build the Swarm libraries use GPerf to generate some source code files.
Download <tt>gperf.exe</tt> from the GnuWin32 site on Sourceforge and place it
somewhere on your Windows <tt>PATH</tt>. Again, [[#RapidEE|RapidEE]] can help set the <tt>PATH</tt> variable.
== RapidEE ==
'''Homepage:''' http://www.rapidee.com
'''Version Used:''' 5.0
'''License:''' [http://www.rapidee.com/en/license Freeware]
The Rapid Environment Editor (RapidEE) is a spiffy tool that makes it easy to inspect and alter the value of Windows environment variables, such as the <tt>PATH</tt>. RapidEE may be used to edit "System Variables" which will affect all user accounts or "User Variables" which will affect just the current account. Administrative privileges may be required to edit the System Variables.
[[Image:RapidEE_1.png|frame|none|alt=The different variables RapidEE can edit]]
Right-clicking on the <tt>Path</tt> variable in the System Variables or User Variables will bring up a menu that presents the option to "Add value":
[[Image:RapidEE_2.png|frame|none|alt=Adding a new value to the PATH]]
Once the new entry has been added, RapidEE must be told to save the changes. Command line shells, such as <tt>cmd.exe</tt>, must be restarted in order for them to notice the changes.
[[Image:RapidEE_3.png|frame|none|alt=Adding and saving a value]]
== Depends ==
'''Homepage:''' http://www.dependencywalker.com/
'''Version Used:''' 2.2
'''License:''' Freeware
Depends is a usefull utility that scans Windows executables and reports information concerning the Dynamic-link Libraries (DLLs) that those executables require in order to run.
= Software Used to Compile Swarm 2.4.1 =
{|
! Name
! Verson Used
! License
! Homepage
! Download Area
|-
| ZLib
| 1.2.5
| [http://www.opensource.org/licenses/Zlib ZLib/PNG License]
| [http://www.zlib.net http://www.zlib.net]
| --
|-
| LibFFI
| 3.0.9
| [http://www.opensource.org/licenses/MIT MIT]
| [http://sourceware.org/libffi http://sourceware.org/libffi]
| --
|-
| LibPNG
| 1.5.4
| [http://www.opensource.org/licenses/Zlib ZLib/PNG]
| [http://www.libpng.org/pub/png/libpng.html http://www.libpng.org/pub/png/libpng.html]
| --
|-
| XPM-NoX
| 4.2.0
| [http://www.opensource.org/licenses/MIT MIT]
| unknown
| Try: [http://gnuwin32.sourceforge.net/packages/xpm-nox.htm http://gnuwin32.sourceforge.net/packages/xpm-nox.htm]
|-
| Tcl
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| Tk
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| BLT
| 2.4z
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://blt.sourceforge.net http://blt.sourceforge.net]
| --
|-
| HDF5
| 1.8.7
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://www.hdfgroup.org/HDF5 http://www.hdfgroup.org/HDF5]
| --
|-
| Swarm
| 2.4.1
| [http://www.opensource.org/licenses/GPL-3.0 GPL]
| [https://savannah.nongnu.org/projects/swarm/ https://savannah.nongnu.org/projects/swarm/]
| [http://download.savannah.gnu.org/releases/swarm/src/swarm/swarm-2.4.1.tar.gz http://download.savannah.gnu.org/releases/swarm/src/swarm/swarm-2.4.1.tar.gz]
|}
23023a7fd4bd2e065a32df6313a8b41db93d0192
2212
2176
2017-11-16T00:43:22Z
Railsback
2
/* MinGW */
wikitext
text/x-wiki
= Overview =
This documentation provides information on how to use Swarm on Windows with [http://www.mingw.org MinGW] compilers. The following topics will be covered:
* How to run a Swam model compiled with MinGW on Windows: Once you produce a Swarm model using MinGW (or someone gives one to you), how do you run it on other machines without installing Swarm there?
* How to use MinGW to compile your own Swarm models, either during model development or so you can distribute working models to others. This requires installing MinGW and our binary Swarm libraries.
* How to package a model compiled with MinGW so it can be installed and run by itself on Windows machines.
* How to use MinGW to compile the Swarm libraries, in case you want to build your own Swarm binaries.
Each topic is more difficult than the one before it. However the topics are independent in that it is not necessary to know how to compile the Swarm library in order to run a pre-compiled Swarm model or compile your own model against a pre-compiled version of Swarm.
= Using Swarm Models Compiled with MinGW =
A model that has been compiled using MinGW can be installed and run from a Windows computer without installing MinGW or Swarm. An example code is this build of Heatbugs:
[http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe]
However, running a Swarm model requires some support programs and libraries. These are available as
<tt>swarm-2.4.1-win32.zip</tt>, available here:
[http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip]
Unzipping that file will create a folder called <tt>swarm</tt> which should be moved somewhere that is easy to remember. The rest of this tutorial will assume this Swarm folder has been placed at <tt>C:\swarm</tt>.
Before a Swarm model can be run, the <tt>swarm\bin</tt> folder must be added to the Windows <tt>PATH</tt> so that Heatbugs can find necessary libraries when it runs. The <tt>swarm\bin</tt> folder can be ''temporarily'' added to the path by executing the following in the Windows command line (the command line is accessed using the program <tt>cmd.exe</tt>):
<pre>path=%PATH%;C:\swarm\bin</pre>
However, it is possible to have conflicts if other versions of libraries used by Swarm, such as HDF5, are already installed and in your path. And some Swarm programs require that the environment variable SWARMHOME be defined, which will typically not be true. These problems can be avoided by using the following statements instead of the above path command:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%</pre>
You can alternatively add the Swarm folder to your <tt>PATH</tt> permanently by editing the Windows PATH environment variable. A tool like [[#RapidEE|RapidEE]] makes doing so easy, or you can use use Windows control panel > System > Advanced > Environment Variables to add <tt>swarm\bin</tt> to the PATH system variable.
Once the path has been set to include the <tt>swarm\bin</tt> folder, Swarm models can be started through the Windows command line, or by double-clicking on them from the Windows Explorer.
The Heatbugs model can now be run by changing the directory of the command line to the folder holding <tt>heatbugs.exe</tt> and then executing the program. For example, if <tt>heatbugs.exe</tt> is located in <tt>C:\Users\example_user\Downloads</tt>, then the model may be run as follows:
<pre>cd C:\Users\example_user\Downloads
heatbugs.exe</pre>
(or you can just double-click on <tt>heatbugs.exe</tt> from Windows Explorer, which temporarily opens a Windows command terminal while the model runs.)
[[Image:Running_Heatbugs.png|frame|none|alt=Running the Heatbugs model]]
You can also create a simple Windows batch file that sets SWARMHOME and the path and then executes the model. Create a file called, for example <tt>heatbugs.bat</tt> in the same directory where <tt>heatbugs.exe</tt> is, containing these lines:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%
heatbugs.exe</pre>
Then, just double-clicking on <tt>heatbugs.bat</tt> will start the model.
If you try this and get an error that some .dll file is not found, then the problem is likely that the path is not set correctly to include the swarm\bin folder. If instead the program crashes without an error statement, then the problem is more likely that SWARMHOME needs to be set.
= Installing Swarm and MinGW to compile models =
To compile Swarm models from source using MinGW, the following simple steps need to be taken to set up the build environment:
* [[#MinGW|Install MinGW using instructions here]]. Currently only 32-bit MinGW can be used with Swarm. Install all components of MinGW.
* Download compiled Swarm binaries, archived as [http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip swarm-2.4.1-win32.zip]. Unzip the archive and place the extracted folder at <tt>C:\swarm</tt>.
'''NOTE:'''
The archived Swarm binaries '''MUST''' be placed at <tt>C:\swarm</tt> to successfully compile Swarm models. This is because some paths had to be hard-coded by <tt>libtool</tt> during the creation of the binaries.
The final step before you can compile a Swarm model is to set the <tt>SWARMHOME</tt> environment variable so that the "make" program knows where to find the Swarm libraries when compiling your code. There are several ways to do this.
*You can temporarily set SWARMHOME by entering this command in the MinGW shell: <pre>export SWARMHOME=/c/swarm</pre>
*You can edit your Makefile so it starts with: <pre>SWARMHOME=/c/swarm</pre>
*Set SWARMHOME permanently as a Windows environment variable, either by using [[#RapidEE|RapidEE]] or Windows control panel > System > Advanced > Environment Variables to add a new (User or System) variable called SWARMHOME with the value <tt>/c/swarm</tt>.
After MinGW has been installed and the Swarm binaries have been downloaded, Swarm models may be compiled using the MinGW shell. Start up the program MinGW Shell, cd to the directory containing your code and Makefile, and enter the command "Make".
An archive of official Swarm example programs can be downloaded from:
[http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
We will use the "Heatbugs" model as an example of how to compile a Swarm application:
<pre>tar xzf /path/to/downloaded/swarmapps-2.3.0.tar.gz
cd swarmapps-2.3.0/objc/heatbugs
make</pre>
'''VERY IMPORTANT NOTE: MinGW produces two executables called <tt>heatbugs.exe</tt>---one in the <tt>heatbugs</tt> folder and another in the <tt>heatbugs/.libs</tt> folder. You should ignore the executable in the top-level folder, <tt>heatbugs/heatbugs.exe</tt>, as it is merely a compiled wrapper script that executes <tt>heatbugs/.libs/heatbugs.exe</tt>. When distributing compiled models, only use binaries from the <tt>.libs</tt> folder.'''
The resulting executable, <tt>.libs/heatbugs.exe</tt> may be executing by following the steps described above at ''Using Swarm Models Compiled with MinGW''. These steps must include setting the Windows Path to include <tt>C:\swarm\bin</tt>.
= Distributing a Swarm Model for Windows Users =
A major benefit of the MinGW version of Swarm is that models can be distributed for people to use without installing Swarm. A simple way to do this, after the model has been compiled and tested using methods in the previous section, is to create a ZIP archive that contains all the files to run the model.
* Create a directory tree that includes the Swarm binary files. For example, create C:\MySwarmModel and add the Swarm binaries (as described [[Swarm_and_MinGW#Using_Swarm_Models_Compiled_with_MinGW|above]]) to it as a subdirectory tree.
* Create another subdirectory that includes just the compiled model.
* Create a third subdirectory that includes any input files that the model needs and a batch file that sets the path and executes the model.
* Zip the whole tree up for distribution.
The directory tree in the zip file looks like this:
<pre>
C:\MySwarmModel\swarm
\bin
\etc
\include
\lib
\man
\share
\executable\MySwarmModel.exe
\Runfiles\MySwarmModel.bat (and any input files)
</pre>
where the file <tt>MySwarmModel.bat</tt> contains:
<pre>
set SWARMHOME=C:\MySwarmModel\swarm
path=%SWARMHOME%\bin;%PATH%
C:\MySwarmModel\executable\MySwarmModel.exe
</pre>
Then users can run the model just by double-clicking on <tt>MySwarmModel.bat</tt>.
= Building Swarm Using MinGW =
This tutorial provides directions and code for compiling your own Swarm libraries for Windows. It is a bit advanced---some familiarity with compiling software from source in a Linux environment and knowledge of the UNIX command line is assumed.
== Install Required Tools ==
The first step is to download and install tools required for compiling Swarm. These links provide directions:
* [[#MinGW|MinGW]]
* [[#Emacs|Emacs]]
* [[#GPerf|GPerf]]
== Build Support Libraries ==
The next steps are to build and install the libraries that Swarm depends on. A ZIP archive containing all the source code required can be found at:
[http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip]
This archive contains two subdirectories:
* sources: This folder contains the source code for each component.
* patches: This folder contains patchfiles that modfy source code so that MinGW can compile it.
After downloading and extracting the source code archive, open up a MinGW shell and run the following commands:
<pre>cd /path/to/where/swarm/source/was/extracted
mkdir build</pre>
The following steps will all assume your MinGW shell is operating out of the <tt>build</tt> directory. All compiled software will be installed to <tt>/c/swarm</tt> (The Windows Explorer will see the folder appear at <tt>C:\swarm</tt>).
=== ZLib ===
ZLib will be the first library to be built as it is a common dependency for many of the other software components. From the <tt>build</tt> directory, execute the following to build Zlib:
<pre>tar xzf ../sources/zlib-1.2.5.tar.gz
cd zlib-1.2.5
make -f win32/Makefile.gcc</pre>
And then the following commands to install ZLib to <tt>/c/swarm</tt>:
<pre>mkdir -p /c/swarm/bin
mkdir -p /c/swarm/include
mkdir -p /c/swarm/lib
cp zlib1.dll /c/swarm/bin/
cp zconf.h zlib.h /c/swarm/include/
mv libzdll.a libz.dll.a
cp *.a /c/swarm/lib</pre>
=== LibPNG ===
LibPNG will be built next as its only dependency is ZLib. From the <tt>build</tt> directory, execute the following steps to build and install LibPNG:
<pre>tar xjf ../sources/libpng-1.5.4.tar.bz2
cd libpng-1.5.4
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm --with-zlib-prefix=/c/swarm
make
make install</pre>
=== XPM ===
Starting from the <tt>build</tt> directory, the XPM library can be built and installed as follows:
<pre>tar xjf ../sources/xpm-nox-4.2.0.tar.bz2
cd xpm-nox-4.2.0
patch -p1 < ../../patches/xpm-nox-4.2.0-mingw-tcl.patch
make CC=gcc
make install prefix=/c/swarm</pre>
'''Summary of patchfile changes:'''
The patchfile is inherited from the SUSE builds of XPM for MinGW and adds Makefiles and other critical components.
One major modification has been made to the SUSE patchfile---<tt>tcl.h</tt> is included in <tt>xpm.h</tt>. This is required in order to use XPM while Tk is installed. Conversely, this means that this build of XPM cannot be used without having Tk installed.
=== LibFFI ===
Starting from the <tt>build</tt> directory, LibFFI can be built and installed as follows:
<pre>tar xzf ../sources/libffi-3.0.9.tar.gz
cd libffi-3.0.9
./configure --prefix=/c/swarm
make
make install</pre>
The LibFFI headers get installed in a weird place.
<pre>mv /c/swarm/lib/libffi-3.0.9/include/*.h /c/swarm/include
rm -rf /c/swarm/lib/libffi-3.0.9</pre>
=== Tcl ===
Starting from the <tt>build</tt> directory, Tcl can be built and installed as follows:
<pre>tar xzf ../sources/tcl8.4.19-src.tar.gz
cd tcl8.4.19
patch -p1 < ../../patches/tcl-8.4.19-fix-lvalues.patch
cd win
./configure --prefix=/c/swarm
make
make install</pre>
'''Summary of patchfile changes:'''
At two places in the TCL source code, an assignment is made while simultaneously performing a typecast. The typecast and the assignment had to be split into separate operations in order to be acceptable to the MinGW compilers.
=== Tk ===
Starting from the <tt>build</tt> directory, Tk can be built and installed as follows:
<pre>tar xzf ../sources/tk8.4.19-src.tar.gz
cd tk8.4.19/win
./configure --prefix=/c/swarm
make
make install</pre>
=== BLT ===
Starting from the <tt>build</tt> directory, BLT can be built and installed as follows:
<pre>tar xzf ../sources/BLT2.4z.tar.gz
cd blt2.4z
./configure --prefix=/c/swarm --without-x
make
make install</pre>
=== HDF5 (Optional) ===
Getting HDF5 to work with MinGW is a little tricky. It is an optional dependency, so if support for reading and writing <tt>.hdf</tt> files is not needed this section can be skipped.
As of version 1.8.7, HDF5 currently does not compile under MinGW. So, we must wrap pre-compiled binaries for use with MinGW. In order to wrap the binaries, we will need an additional tool called <tt>pexports</tt>. This can be installed using <tt>mingw-get</tt>:
<pre>mingw-get install mingw-utils</pre>
Download 32-bit Windows binaries from the HDF website compiled for use with the Visual Studio compilers (these files have "VS" listed under the ''Compilers'' section). After extracting the archive, the HDF5 libraries can be wrapped for use with MinGW by executing the following commands:
<pre>cd path/to/where/HDF5/was/extracted
for dll in `ls dll/*dll`; do
def_file=`basename $dll .dll`.def
lib_file=lib`basename $dll dll.dll`.a
pexports $dll > $def_file
dlltool -d $def_file -l lib/$lib_file
done</pre>
Next, move the libraries and header files needed to use HDF5 from C into <tt>C:\swarm</tt>:
<pre>cp dll/hdf5dll.dll dll/szip.dll /c/swarm/bin
cp include/* /c/swarm/include
cp lib/libhdf5.a /c/swarm/lib</pre>
Finally, a patch must be applied to the HDF header file <tt>H5public.h</tt> so that it doesn't define <tt>ssize_t</tt>---a constant already defined by MinGW. The required patch is contained in the Swarm MinGW source archive:
<pre>cd /path/to/where/swarm/source/was/extracted
patch -p1 -d /c/swarm < patches/hdf5-1.8.7-mingw.patch</pre>
== Build Swarm ==
Finally, the Swarm libraries themselves can be built. From the <tt>build</tt> directory, execute the following
<pre>tar xzf ../sources/swarm-2.4.1.tar.gz
cd swarm-2.4.1
patch -p1 ../../patches/swarm-2.4.1-mingw.patch
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm \
--with-zlibdir=/c/swarm \
--with-pngdir=/c/swarm \
--with-xpmdir=/c/swarm \
--with-ffidir=/c/swarm \
--with-tcl=/c/swarm/lib \
--with-tk=/c/swarm/lib \
--with-bltdir=/c/swarm
cd avcall
gcc -S avcall-i386.c
cd ..
make
make install</pre>
If you wrapped HDF5 up for use with MinGW, add <tt>--with-hdf5dir=/c/swarm</tt> to the list of arguments passed to <tt>configure</tt>.
'''Summary of patchfile changes:'''
<tt>swarm-2.4.1-mingw.patch</tt> modifies the Swarm source code in the following ways:
* <tt>gettimeofday</tt> is no longer defined in the Swarm sources as MinGW includes this function in its standard library.
* Swarm GUI functions are updated to be compatible with LibPNG 1.5.
* The Swarm <tt>configure</tt> script defines <tt>DATADIR</tt> as a preprocessor macro---this conflicts with variables in the GCC Objective-C library. <tt>DATDIR</tt> is <tt>undef</tt>ed in critical parts of the source code.
* The <tt>sleep</tt> function is aliased to <tt>usleep</tt>---which is the name of the MinGW implementation.
* The way in which Makefiles invoke <tt>gperf</tt> is amended so that it actually produces output.
* NULL checks are added to `zstrdup` in src/defobj/internal.m. Some functions in the Swarm library may attempt to call `zstrdup` on a NULL pointer. (This happens if the SWARMHOME environment variable is not set.) Failing to check for this condition can lead to segfaults. `zstrdup` now returns NULL if passed a NULL string or if `alloc` fails to allocate memory for a duplicate.
Full details are contained in the patchfile.
= Tools =
== MinGW ==
'''Homepage:''' http://www.mingw.org
'''Now, for Swarm, you must use an older version of MinGW with compiler (gcc) version of 4.6.x or earlier.''' Search the web for a file like this x86_64-w64-mingw32-gcc-4.5.3-release-linux_rubenvb.tar.lzma and follow instructions for installing.
'''Version Used:''' 20110530
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
[http://www.mingw.org MinGW] is a set of software that aims to provide an environment where software developed on UNIX-like systems can be easily compiled for Windows. Since Swarm is primarily developed on Linux (a UNIX clone), MinGW can ease the task of creating Swarm models that run on Windows.
MinGW is similar to the [http://www.cygwin.org Cygwin] project. The major difference is that MinGW produces executables that depend only on native Windows libraries while Cygwin executables require special compatibility libraries that are part of the Cygwin distribution.
=== Installing MinGW ===
MinGW can be installed by downloading the "Automated MinGW Installer", which usually has a name like <tt>mingw-get-inst-<date>.exe</tt> where <tt><date></tt> is the datestamp for when the installer was packaged. Running this executable will start the installation process. The installer lets you select which optional components to install; make sure all boxes are checked so you '''install all components'''.
[[Image:MinGW_Setup.png|frame|none|alt=Install all available MinGW components]]
The installer downloads all components from the internet. This will take a while, so have a cup of coffee or walk the dog.
See the following section about also installing an optional, more-functional shell window for MinGW.
=== Using MinGW ===
The MinGW compilers are accessible through the "MinGW Shell" which should be located under the MinGW folder in the Start Menu:
[[Image:MinGW_Shell.png|frame|none|alt=Location of MinGW Shell]]
or by running <tt>C:\MinGW\msys\1.0\msys.bat</tt> (if MinGW was installed to its default location).
By default the MinGW shell executes inside of a Windows <tt>cmd.exe</tt> terminal. There are a couple major drawbacks to this:
* You cannot resize the window to full-screen.
* The shell provides limited history scrollback.
MinGW provides a couple of alternative terminals for the MinGW shell which do not have these drawbacks; one of which is called MinTTY. To install MinTTY execute the following in a MinGW shell:
<pre>mingw-get install mintty</pre>
Then the <tt>mintty</tt> command can be used to launch a MinTTY terminal. The MinGW Shell can also be set to launch MinTTY by default by editing the file <tt>C:\MinGW\msys\1.0\msys.bat</tt> and changing the following line (approximately line 58):
<pre>if "x%MSYSCON%" == "xunknown" set MSYSCON=sh.exe</pre>
to:
<pre>if "x%MSYSCON%" == "xunknown" set MSYSCON=mintty.exe</pre>
=== A Note About Paths ===
The MinGW Shell emulates a UNIX <tt>bash</tt> shell and thus uses UNIX-style paths, <tt>/path/to/file</tt>, instead of Windows-style paths, <tt>C:\path\to\file</tt>. One peculiarity of this process is that the shell must deal with the fact that Windows filesystems have multiple roots (<tt>C:</tt>, <tt>D:</tt>, etc.) while a UNIX filesystem only has one root called <tt>/</tt>. The way this is reconciled by the <tt>bash</tt> shell provided with MinGW is that <tt>/c</tt> refers to the root of the <tt>C:</tt> drive, <tt>/d</tt> refers to the root of the <tt>D:</tt> drive and so on and so forth.
The root of the filesystem itself, <tt>/</tt>, also has some caveats. <tt>/</tt> refers to the <tt>mysy</tt> folder, <tt>C:/MinGW/mysys/1.0</tt> in a default installation. <tt>/usr</tt> also refers to the same location. Thus, <tt>/usr/local</tt> and <tt>/local</tt> both refer to <tt>C:/MinGW/mysys/1.0/local</tt>.
=== A Note About MinGW-64 ===
Currently Swarm has been developed and tested against the 32-bit version of MinGW. Hence Swarm models produced this way should run in any version of Windows.
The [MinGW-w64][mingw_65] project produces 64-bit MinGW compilers that can produce 64-bit executables that will only run on 64-bit versions of Windows. These executables benefit from:
* Access to more memory. A 32-bit executable will only be able to allocate ~3 GB of RAM---even if the system has more RAM available.
* Possibly quicker execution speeds due to matching the native architecture of the operating system---however this depends on the types of tasks that the program executes. It has been reported that 64 bit Swarm executables run quicker than 32 bit Swarm executables on Linux.
Currently, no attempt has been made to compile Swarm 2.4.1 with the 64 bit MinGW compilers. If a successful attempt is made, please report it on the [http://www.swarm.org/mailman/listinfo/support Swarm mailing list].
== Emacs ==
'''Homepage:''' http://www.gnu.org/software/emacs
'''Version Used:''' 23.3
'''Download Area:''' http://ftp.gnu.org/gnu/emacs/windows
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GNU Emacs is a text editor that is used by many programmers to edit code. However, Emacs can also be scripted to perform a variety of complicated transformations on text files. The scripts that build the Swarm libraries use Emacs to automate the process of generating some source files. Thus Emacs has to be installed in order to build Swarm from source.
=== Installing Emacs ===
Install Emacs by downloading one of the <tt>emacs-<version
number>-bin-i386.zip</tt> files from the download area. Don't use any of the
files containing <tt>barebin</tt>. After extracting the ZIP archive there will
be an Emacs folder containing a subfolder called <tt>bin</tt>. Add this folder
to your Windows <tt>PATH</tt>. [[#RapidEE|RapidEE]] can help edit the
<tt>PATH</tt> variable.
== GPerf ==
'''Homepage:''' http://www.gnu.org/software/gperf/
'''Download Area:''' http://sourceforge.net/projects/gnuwin32/files/gperf
'''Version Used:''' 3.0.1
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GPerf is a program that produces C code containing hash functions. The scripts
that build the Swarm libraries use GPerf to generate some source code files.
Download <tt>gperf.exe</tt> from the GnuWin32 site on Sourceforge and place it
somewhere on your Windows <tt>PATH</tt>. Again, [[#RapidEE|RapidEE]] can help set the <tt>PATH</tt> variable.
== RapidEE ==
'''Homepage:''' http://www.rapidee.com
'''Version Used:''' 5.0
'''License:''' [http://www.rapidee.com/en/license Freeware]
The Rapid Environment Editor (RapidEE) is a spiffy tool that makes it easy to inspect and alter the value of Windows environment variables, such as the <tt>PATH</tt>. RapidEE may be used to edit "System Variables" which will affect all user accounts or "User Variables" which will affect just the current account. Administrative privileges may be required to edit the System Variables.
[[Image:RapidEE_1.png|frame|none|alt=The different variables RapidEE can edit]]
Right-clicking on the <tt>Path</tt> variable in the System Variables or User Variables will bring up a menu that presents the option to "Add value":
[[Image:RapidEE_2.png|frame|none|alt=Adding a new value to the PATH]]
Once the new entry has been added, RapidEE must be told to save the changes. Command line shells, such as <tt>cmd.exe</tt>, must be restarted in order for them to notice the changes.
[[Image:RapidEE_3.png|frame|none|alt=Adding and saving a value]]
== Depends ==
'''Homepage:''' http://www.dependencywalker.com/
'''Version Used:''' 2.2
'''License:''' Freeware
Depends is a usefull utility that scans Windows executables and reports information concerning the Dynamic-link Libraries (DLLs) that those executables require in order to run.
= Software Used to Compile Swarm 2.4.1 =
{|
! Name
! Verson Used
! License
! Homepage
! Download Area
|-
| ZLib
| 1.2.5
| [http://www.opensource.org/licenses/Zlib ZLib/PNG License]
| [http://www.zlib.net http://www.zlib.net]
| --
|-
| LibFFI
| 3.0.9
| [http://www.opensource.org/licenses/MIT MIT]
| [http://sourceware.org/libffi http://sourceware.org/libffi]
| --
|-
| LibPNG
| 1.5.4
| [http://www.opensource.org/licenses/Zlib ZLib/PNG]
| [http://www.libpng.org/pub/png/libpng.html http://www.libpng.org/pub/png/libpng.html]
| --
|-
| XPM-NoX
| 4.2.0
| [http://www.opensource.org/licenses/MIT MIT]
| unknown
| Try: [http://gnuwin32.sourceforge.net/packages/xpm-nox.htm http://gnuwin32.sourceforge.net/packages/xpm-nox.htm]
|-
| Tcl
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| Tk
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| BLT
| 2.4z
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://blt.sourceforge.net http://blt.sourceforge.net]
| --
|-
| HDF5
| 1.8.7
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://www.hdfgroup.org/HDF5 http://www.hdfgroup.org/HDF5]
| --
|-
| Swarm
| 2.4.1
| [http://www.opensource.org/licenses/GPL-3.0 GPL]
| [https://savannah.nongnu.org/projects/swarm/ https://savannah.nongnu.org/projects/swarm/]
| [http://download.savannah.gnu.org/releases/swarm/src/swarm/swarm-2.4.1.tar.gz http://download.savannah.gnu.org/releases/swarm/src/swarm/swarm-2.4.1.tar.gz]
|}
8b1d459d0fb4eae186301d6d2556be8fd94126df
2176
2175
2015-12-03T02:04:00Z
SwarmWikiSysop
5
/* Software Used to Compile Swarm 2.4.1 */
wikitext
text/x-wiki
= Overview =
This documentation provides information on how to use Swarm on Windows with [http://www.mingw.org MinGW] compilers. The following topics will be covered:
* How to run a Swam model compiled with MinGW on Windows: Once you produce a Swarm model using MinGW (or someone gives one to you), how do you run it on other machines without installing Swarm there?
* How to use MinGW to compile your own Swarm models, either during model development or so you can distribute working models to others. This requires installing MinGW and our binary Swarm libraries.
* How to package a model compiled with MinGW so it can be installed and run by itself on Windows machines.
* How to use MinGW to compile the Swarm libraries, in case you want to build your own Swarm binaries.
Each topic is more difficult than the one before it. However the topics are independent in that it is not necessary to know how to compile the Swarm library in order to run a pre-compiled Swarm model or compile your own model against a pre-compiled version of Swarm.
= Using Swarm Models Compiled with MinGW =
A model that has been compiled using MinGW can be installed and run from a Windows computer without installing MinGW or Swarm. An example code is this build of Heatbugs:
[http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe]
However, running a Swarm model requires some support programs and libraries. These are available as
<tt>swarm-2.4.1-win32.zip</tt>, available here:
[http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip]
Unzipping that file will create a folder called <tt>swarm</tt> which should be moved somewhere that is easy to remember. The rest of this tutorial will assume this Swarm folder has been placed at <tt>C:\swarm</tt>.
Before a Swarm model can be run, the <tt>swarm\bin</tt> folder must be added to the Windows <tt>PATH</tt> so that Heatbugs can find necessary libraries when it runs. The <tt>swarm\bin</tt> folder can be ''temporarily'' added to the path by executing the following in the Windows command line (the command line is accessed using the program <tt>cmd.exe</tt>):
<pre>path=%PATH%;C:\swarm\bin</pre>
However, it is possible to have conflicts if other versions of libraries used by Swarm, such as HDF5, are already installed and in your path. And some Swarm programs require that the environment variable SWARMHOME be defined, which will typically not be true. These problems can be avoided by using the following statements instead of the above path command:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%</pre>
You can alternatively add the Swarm folder to your <tt>PATH</tt> permanently by editing the Windows PATH environment variable. A tool like [[#RapidEE|RapidEE]] makes doing so easy, or you can use use Windows control panel > System > Advanced > Environment Variables to add <tt>swarm\bin</tt> to the PATH system variable.
Once the path has been set to include the <tt>swarm\bin</tt> folder, Swarm models can be started through the Windows command line, or by double-clicking on them from the Windows Explorer.
The Heatbugs model can now be run by changing the directory of the command line to the folder holding <tt>heatbugs.exe</tt> and then executing the program. For example, if <tt>heatbugs.exe</tt> is located in <tt>C:\Users\example_user\Downloads</tt>, then the model may be run as follows:
<pre>cd C:\Users\example_user\Downloads
heatbugs.exe</pre>
(or you can just double-click on <tt>heatbugs.exe</tt> from Windows Explorer, which temporarily opens a Windows command terminal while the model runs.)
[[Image:Running_Heatbugs.png|frame|none|alt=Running the Heatbugs model]]
You can also create a simple Windows batch file that sets SWARMHOME and the path and then executes the model. Create a file called, for example <tt>heatbugs.bat</tt> in the same directory where <tt>heatbugs.exe</tt> is, containing these lines:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%
heatbugs.exe</pre>
Then, just double-clicking on <tt>heatbugs.bat</tt> will start the model.
If you try this and get an error that some .dll file is not found, then the problem is likely that the path is not set correctly to include the swarm\bin folder. If instead the program crashes without an error statement, then the problem is more likely that SWARMHOME needs to be set.
= Installing Swarm and MinGW to compile models =
To compile Swarm models from source using MinGW, the following simple steps need to be taken to set up the build environment:
* [[#MinGW|Install MinGW using instructions here]]. Currently only 32-bit MinGW can be used with Swarm. Install all components of MinGW.
* Download compiled Swarm binaries, archived as [http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip swarm-2.4.1-win32.zip]. Unzip the archive and place the extracted folder at <tt>C:\swarm</tt>.
'''NOTE:'''
The archived Swarm binaries '''MUST''' be placed at <tt>C:\swarm</tt> to successfully compile Swarm models. This is because some paths had to be hard-coded by <tt>libtool</tt> during the creation of the binaries.
The final step before you can compile a Swarm model is to set the <tt>SWARMHOME</tt> environment variable so that the "make" program knows where to find the Swarm libraries when compiling your code. There are several ways to do this.
*You can temporarily set SWARMHOME by entering this command in the MinGW shell: <pre>export SWARMHOME=/c/swarm</pre>
*You can edit your Makefile so it starts with: <pre>SWARMHOME=/c/swarm</pre>
*Set SWARMHOME permanently as a Windows environment variable, either by using [[#RapidEE|RapidEE]] or Windows control panel > System > Advanced > Environment Variables to add a new (User or System) variable called SWARMHOME with the value <tt>/c/swarm</tt>.
After MinGW has been installed and the Swarm binaries have been downloaded, Swarm models may be compiled using the MinGW shell. Start up the program MinGW Shell, cd to the directory containing your code and Makefile, and enter the command "Make".
An archive of official Swarm example programs can be downloaded from:
[http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
We will use the "Heatbugs" model as an example of how to compile a Swarm application:
<pre>tar xzf /path/to/downloaded/swarmapps-2.3.0.tar.gz
cd swarmapps-2.3.0/objc/heatbugs
make</pre>
'''VERY IMPORTANT NOTE: MinGW produces two executables called <tt>heatbugs.exe</tt>---one in the <tt>heatbugs</tt> folder and another in the <tt>heatbugs/.libs</tt> folder. You should ignore the executable in the top-level folder, <tt>heatbugs/heatbugs.exe</tt>, as it is merely a compiled wrapper script that executes <tt>heatbugs/.libs/heatbugs.exe</tt>. When distributing compiled models, only use binaries from the <tt>.libs</tt> folder.'''
The resulting executable, <tt>.libs/heatbugs.exe</tt> may be executing by following the steps described above at ''Using Swarm Models Compiled with MinGW''. These steps must include setting the Windows Path to include <tt>C:\swarm\bin</tt>.
= Distributing a Swarm Model for Windows Users =
A major benefit of the MinGW version of Swarm is that models can be distributed for people to use without installing Swarm. A simple way to do this, after the model has been compiled and tested using methods in the previous section, is to create a ZIP archive that contains all the files to run the model.
* Create a directory tree that includes the Swarm binary files. For example, create C:\MySwarmModel and add the Swarm binaries (as described [[Swarm_and_MinGW#Using_Swarm_Models_Compiled_with_MinGW|above]]) to it as a subdirectory tree.
* Create another subdirectory that includes just the compiled model.
* Create a third subdirectory that includes any input files that the model needs and a batch file that sets the path and executes the model.
* Zip the whole tree up for distribution.
The directory tree in the zip file looks like this:
<pre>
C:\MySwarmModel\swarm
\bin
\etc
\include
\lib
\man
\share
\executable\MySwarmModel.exe
\Runfiles\MySwarmModel.bat (and any input files)
</pre>
where the file <tt>MySwarmModel.bat</tt> contains:
<pre>
set SWARMHOME=C:\MySwarmModel\swarm
path=%SWARMHOME%\bin;%PATH%
C:\MySwarmModel\executable\MySwarmModel.exe
</pre>
Then users can run the model just by double-clicking on <tt>MySwarmModel.bat</tt>.
= Building Swarm Using MinGW =
This tutorial provides directions and code for compiling your own Swarm libraries for Windows. It is a bit advanced---some familiarity with compiling software from source in a Linux environment and knowledge of the UNIX command line is assumed.
== Install Required Tools ==
The first step is to download and install tools required for compiling Swarm. These links provide directions:
* [[#MinGW|MinGW]]
* [[#Emacs|Emacs]]
* [[#GPerf|GPerf]]
== Build Support Libraries ==
The next steps are to build and install the libraries that Swarm depends on. A ZIP archive containing all the source code required can be found at:
[http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip]
This archive contains two subdirectories:
* sources: This folder contains the source code for each component.
* patches: This folder contains patchfiles that modfy source code so that MinGW can compile it.
After downloading and extracting the source code archive, open up a MinGW shell and run the following commands:
<pre>cd /path/to/where/swarm/source/was/extracted
mkdir build</pre>
The following steps will all assume your MinGW shell is operating out of the <tt>build</tt> directory. All compiled software will be installed to <tt>/c/swarm</tt> (The Windows Explorer will see the folder appear at <tt>C:\swarm</tt>).
=== ZLib ===
ZLib will be the first library to be built as it is a common dependency for many of the other software components. From the <tt>build</tt> directory, execute the following to build Zlib:
<pre>tar xzf ../sources/zlib-1.2.5.tar.gz
cd zlib-1.2.5
make -f win32/Makefile.gcc</pre>
And then the following commands to install ZLib to <tt>/c/swarm</tt>:
<pre>mkdir -p /c/swarm/bin
mkdir -p /c/swarm/include
mkdir -p /c/swarm/lib
cp zlib1.dll /c/swarm/bin/
cp zconf.h zlib.h /c/swarm/include/
mv libzdll.a libz.dll.a
cp *.a /c/swarm/lib</pre>
=== LibPNG ===
LibPNG will be built next as its only dependency is ZLib. From the <tt>build</tt> directory, execute the following steps to build and install LibPNG:
<pre>tar xjf ../sources/libpng-1.5.4.tar.bz2
cd libpng-1.5.4
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm --with-zlib-prefix=/c/swarm
make
make install</pre>
=== XPM ===
Starting from the <tt>build</tt> directory, the XPM library can be built and installed as follows:
<pre>tar xjf ../sources/xpm-nox-4.2.0.tar.bz2
cd xpm-nox-4.2.0
patch -p1 < ../../patches/xpm-nox-4.2.0-mingw-tcl.patch
make CC=gcc
make install prefix=/c/swarm</pre>
'''Summary of patchfile changes:'''
The patchfile is inherited from the SUSE builds of XPM for MinGW and adds Makefiles and other critical components.
One major modification has been made to the SUSE patchfile---<tt>tcl.h</tt> is included in <tt>xpm.h</tt>. This is required in order to use XPM while Tk is installed. Conversely, this means that this build of XPM cannot be used without having Tk installed.
=== LibFFI ===
Starting from the <tt>build</tt> directory, LibFFI can be built and installed as follows:
<pre>tar xzf ../sources/libffi-3.0.9.tar.gz
cd libffi-3.0.9
./configure --prefix=/c/swarm
make
make install</pre>
The LibFFI headers get installed in a weird place.
<pre>mv /c/swarm/lib/libffi-3.0.9/include/*.h /c/swarm/include
rm -rf /c/swarm/lib/libffi-3.0.9</pre>
=== Tcl ===
Starting from the <tt>build</tt> directory, Tcl can be built and installed as follows:
<pre>tar xzf ../sources/tcl8.4.19-src.tar.gz
cd tcl8.4.19
patch -p1 < ../../patches/tcl-8.4.19-fix-lvalues.patch
cd win
./configure --prefix=/c/swarm
make
make install</pre>
'''Summary of patchfile changes:'''
At two places in the TCL source code, an assignment is made while simultaneously performing a typecast. The typecast and the assignment had to be split into separate operations in order to be acceptable to the MinGW compilers.
=== Tk ===
Starting from the <tt>build</tt> directory, Tk can be built and installed as follows:
<pre>tar xzf ../sources/tk8.4.19-src.tar.gz
cd tk8.4.19/win
./configure --prefix=/c/swarm
make
make install</pre>
=== BLT ===
Starting from the <tt>build</tt> directory, BLT can be built and installed as follows:
<pre>tar xzf ../sources/BLT2.4z.tar.gz
cd blt2.4z
./configure --prefix=/c/swarm --without-x
make
make install</pre>
=== HDF5 (Optional) ===
Getting HDF5 to work with MinGW is a little tricky. It is an optional dependency, so if support for reading and writing <tt>.hdf</tt> files is not needed this section can be skipped.
As of version 1.8.7, HDF5 currently does not compile under MinGW. So, we must wrap pre-compiled binaries for use with MinGW. In order to wrap the binaries, we will need an additional tool called <tt>pexports</tt>. This can be installed using <tt>mingw-get</tt>:
<pre>mingw-get install mingw-utils</pre>
Download 32-bit Windows binaries from the HDF website compiled for use with the Visual Studio compilers (these files have "VS" listed under the ''Compilers'' section). After extracting the archive, the HDF5 libraries can be wrapped for use with MinGW by executing the following commands:
<pre>cd path/to/where/HDF5/was/extracted
for dll in `ls dll/*dll`; do
def_file=`basename $dll .dll`.def
lib_file=lib`basename $dll dll.dll`.a
pexports $dll > $def_file
dlltool -d $def_file -l lib/$lib_file
done</pre>
Next, move the libraries and header files needed to use HDF5 from C into <tt>C:\swarm</tt>:
<pre>cp dll/hdf5dll.dll dll/szip.dll /c/swarm/bin
cp include/* /c/swarm/include
cp lib/libhdf5.a /c/swarm/lib</pre>
Finally, a patch must be applied to the HDF header file <tt>H5public.h</tt> so that it doesn't define <tt>ssize_t</tt>---a constant already defined by MinGW. The required patch is contained in the Swarm MinGW source archive:
<pre>cd /path/to/where/swarm/source/was/extracted
patch -p1 -d /c/swarm < patches/hdf5-1.8.7-mingw.patch</pre>
== Build Swarm ==
Finally, the Swarm libraries themselves can be built. From the <tt>build</tt> directory, execute the following
<pre>tar xzf ../sources/swarm-2.4.1.tar.gz
cd swarm-2.4.1
patch -p1 ../../patches/swarm-2.4.1-mingw.patch
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm \
--with-zlibdir=/c/swarm \
--with-pngdir=/c/swarm \
--with-xpmdir=/c/swarm \
--with-ffidir=/c/swarm \
--with-tcl=/c/swarm/lib \
--with-tk=/c/swarm/lib \
--with-bltdir=/c/swarm
cd avcall
gcc -S avcall-i386.c
cd ..
make
make install</pre>
If you wrapped HDF5 up for use with MinGW, add <tt>--with-hdf5dir=/c/swarm</tt> to the list of arguments passed to <tt>configure</tt>.
'''Summary of patchfile changes:'''
<tt>swarm-2.4.1-mingw.patch</tt> modifies the Swarm source code in the following ways:
* <tt>gettimeofday</tt> is no longer defined in the Swarm sources as MinGW includes this function in its standard library.
* Swarm GUI functions are updated to be compatible with LibPNG 1.5.
* The Swarm <tt>configure</tt> script defines <tt>DATADIR</tt> as a preprocessor macro---this conflicts with variables in the GCC Objective-C library. <tt>DATDIR</tt> is <tt>undef</tt>ed in critical parts of the source code.
* The <tt>sleep</tt> function is aliased to <tt>usleep</tt>---which is the name of the MinGW implementation.
* The way in which Makefiles invoke <tt>gperf</tt> is amended so that it actually produces output.
* NULL checks are added to `zstrdup` in src/defobj/internal.m. Some functions in the Swarm library may attempt to call `zstrdup` on a NULL pointer. (This happens if the SWARMHOME environment variable is not set.) Failing to check for this condition can lead to segfaults. `zstrdup` now returns NULL if passed a NULL string or if `alloc` fails to allocate memory for a duplicate.
Full details are contained in the patchfile.
= Tools =
== MinGW ==
'''Homepage:''' http://www.mingw.org
'''Download Area:''' http://sourceforge.net/projects/mingw/files
'''Version Used:''' 20110530
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
[http://www.mingw.org MinGW] is a set of software that aims to provide an environment where software developed on UNIX-like systems can be easily compiled for Windows. Since Swarm is primarily developed on Linux (a UNIX clone), MinGW can ease the task of creating Swarm models that run on Windows.
MinGW is similar to the [http://www.cygwin.org Cygwin] project. The major difference is that MinGW produces executables that depend only on native Windows libraries while Cygwin executables require special compatibility libraries that are part of the Cygwin distribution.
=== Installing MinGW ===
MinGW can be installed by downloading the "Automated MinGW Installer", which usually has a name like <tt>mingw-get-inst-<date>.exe</tt> where <tt><date></tt> is the datestamp for when the installer was packaged. Running this executable will start the installation process. The installer lets you select which optional components to install; make sure all boxes are checked so you '''install all components'''.
[[Image:MinGW_Setup.png|frame|none|alt=Install all available MinGW components]]
The installer downloads all components from the internet. This will take a while, so have a cup of coffee or walk the dog.
See the following section about also installing an optional, more-functional shell window for MinGW.
=== Using MinGW ===
The MinGW compilers are accessible through the "MinGW Shell" which should be located under the MinGW folder in the Start Menu:
[[Image:MinGW_Shell.png|frame|none|alt=Location of MinGW Shell]]
or by running <tt>C:\MinGW\msys\1.0\msys.bat</tt> (if MinGW was installed to its default location).
By default the MinGW shell executes inside of a Windows <tt>cmd.exe</tt> terminal. There are a couple major drawbacks to this:
* You cannot resize the window to full-screen.
* The shell provides limited history scrollback.
MinGW provides a couple of alternative terminals for the MinGW shell which do not have these drawbacks; one of which is called MinTTY. To install MinTTY execute the following in a MinGW shell:
<pre>mingw-get install mintty</pre>
Then the <tt>mintty</tt> command can be used to launch a MinTTY terminal. The MinGW Shell can also be set to launch MinTTY by default by editing the file <tt>C:\MinGW\msys\1.0\msys.bat</tt> and changing the following line (approximately line 58):
<pre>if "x%MSYSCON%" == "xunknown" set MSYSCON=sh.exe</pre>
to:
<pre>if "x%MSYSCON%" == "xunknown" set MSYSCON=mintty.exe</pre>
=== A Note About Paths ===
The MinGW Shell emulates a UNIX <tt>bash</tt> shell and thus uses UNIX-style paths, <tt>/path/to/file</tt>, instead of Windows-style paths, <tt>C:\path\to\file</tt>. One peculiarity of this process is that the shell must deal with the fact that Windows filesystems have multiple roots (<tt>C:</tt>, <tt>D:</tt>, etc.) while a UNIX filesystem only has one root called <tt>/</tt>. The way this is reconciled by the <tt>bash</tt> shell provided with MinGW is that <tt>/c</tt> refers to the root of the <tt>C:</tt> drive, <tt>/d</tt> refers to the root of the <tt>D:</tt> drive and so on and so forth.
The root of the filesystem itself, <tt>/</tt>, also has some caveats. <tt>/</tt> refers to the <tt>mysy</tt> folder, <tt>C:/MinGW/mysys/1.0</tt> in a default installation. <tt>/usr</tt> also refers to the same location. Thus, <tt>/usr/local</tt> and <tt>/local</tt> both refer to <tt>C:/MinGW/mysys/1.0/local</tt>.
=== A Note About MinGW-64 ===
Currently Swarm has been developed and tested against the 32-bit version of MinGW. Hence Swarm models produced this way should run in any version of Windows.
The [MinGW-w64][mingw_65] project produces 64-bit MinGW compilers that can produce 64-bit executables that will only run on 64-bit versions of Windows. These executables benefit from:
* Access to more memory. A 32-bit executable will only be able to allocate ~3 GB of RAM---even if the system has more RAM available.
* Possibly quicker execution speeds due to matching the native architecture of the operating system---however this depends on the types of tasks that the program executes. It has been reported that 64 bit Swarm executables run quicker than 32 bit Swarm executables on Linux.
Currently, no attempt has been made to compile Swarm 2.4.1 with the 64 bit MinGW compilers. If a successful attempt is made, please report it on the [http://www.swarm.org/mailman/listinfo/support Swarm mailing list].
== Emacs ==
'''Homepage:''' http://www.gnu.org/software/emacs
'''Version Used:''' 23.3
'''Download Area:''' http://ftp.gnu.org/gnu/emacs/windows
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GNU Emacs is a text editor that is used by many programmers to edit code. However, Emacs can also be scripted to perform a variety of complicated transformations on text files. The scripts that build the Swarm libraries use Emacs to automate the process of generating some source files. Thus Emacs has to be installed in order to build Swarm from source.
=== Installing Emacs ===
Install Emacs by downloading one of the <tt>emacs-<version
number>-bin-i386.zip</tt> files from the download area. Don't use any of the
files containing <tt>barebin</tt>. After extracting the ZIP archive there will
be an Emacs folder containing a subfolder called <tt>bin</tt>. Add this folder
to your Windows <tt>PATH</tt>. [[#RapidEE|RapidEE]] can help edit the
<tt>PATH</tt> variable.
== GPerf ==
'''Homepage:''' http://www.gnu.org/software/gperf/
'''Download Area:''' http://sourceforge.net/projects/gnuwin32/files/gperf
'''Version Used:''' 3.0.1
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GPerf is a program that produces C code containing hash functions. The scripts
that build the Swarm libraries use GPerf to generate some source code files.
Download <tt>gperf.exe</tt> from the GnuWin32 site on Sourceforge and place it
somewhere on your Windows <tt>PATH</tt>. Again, [[#RapidEE|RapidEE]] can help set the <tt>PATH</tt> variable.
== RapidEE ==
'''Homepage:''' http://www.rapidee.com
'''Version Used:''' 5.0
'''License:''' [http://www.rapidee.com/en/license Freeware]
The Rapid Environment Editor (RapidEE) is a spiffy tool that makes it easy to inspect and alter the value of Windows environment variables, such as the <tt>PATH</tt>. RapidEE may be used to edit "System Variables" which will affect all user accounts or "User Variables" which will affect just the current account. Administrative privileges may be required to edit the System Variables.
[[Image:RapidEE_1.png|frame|none|alt=The different variables RapidEE can edit]]
Right-clicking on the <tt>Path</tt> variable in the System Variables or User Variables will bring up a menu that presents the option to "Add value":
[[Image:RapidEE_2.png|frame|none|alt=Adding a new value to the PATH]]
Once the new entry has been added, RapidEE must be told to save the changes. Command line shells, such as <tt>cmd.exe</tt>, must be restarted in order for them to notice the changes.
[[Image:RapidEE_3.png|frame|none|alt=Adding and saving a value]]
== Depends ==
'''Homepage:''' http://www.dependencywalker.com/
'''Version Used:''' 2.2
'''License:''' Freeware
Depends is a usefull utility that scans Windows executables and reports information concerning the Dynamic-link Libraries (DLLs) that those executables require in order to run.
= Software Used to Compile Swarm 2.4.1 =
{|
! Name
! Verson Used
! License
! Homepage
! Download Area
|-
| ZLib
| 1.2.5
| [http://www.opensource.org/licenses/Zlib ZLib/PNG License]
| [http://www.zlib.net http://www.zlib.net]
| --
|-
| LibFFI
| 3.0.9
| [http://www.opensource.org/licenses/MIT MIT]
| [http://sourceware.org/libffi http://sourceware.org/libffi]
| --
|-
| LibPNG
| 1.5.4
| [http://www.opensource.org/licenses/Zlib ZLib/PNG]
| [http://www.libpng.org/pub/png/libpng.html http://www.libpng.org/pub/png/libpng.html]
| --
|-
| XPM-NoX
| 4.2.0
| [http://www.opensource.org/licenses/MIT MIT]
| unknown
| Try: [http://gnuwin32.sourceforge.net/packages/xpm-nox.htm http://gnuwin32.sourceforge.net/packages/xpm-nox.htm]
|-
| Tcl
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| Tk
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| BLT
| 2.4z
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://blt.sourceforge.net http://blt.sourceforge.net]
| --
|-
| HDF5
| 1.8.7
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://www.hdfgroup.org/HDF5 http://www.hdfgroup.org/HDF5]
| --
|-
| Swarm
| 2.4.1
| [http://www.opensource.org/licenses/GPL-3.0 GPL]
| [https://savannah.nongnu.org/projects/swarm/ https://savannah.nongnu.org/projects/swarm/]
| [http://download.savannah.gnu.org/releases/swarm/src/swarm/swarm-2.4.1.tar.gz http://download.savannah.gnu.org/releases/swarm/src/swarm/swarm-2.4.1.tar.gz]
|}
42a39d1d3a271bf3bb56e71a80957074337d1f09
2175
2174
2015-12-03T02:01:23Z
SwarmWikiSysop
5
/* Software Used to Compile Swarm 2.4.1 */
wikitext
text/x-wiki
= Overview =
This documentation provides information on how to use Swarm on Windows with [http://www.mingw.org MinGW] compilers. The following topics will be covered:
* How to run a Swam model compiled with MinGW on Windows: Once you produce a Swarm model using MinGW (or someone gives one to you), how do you run it on other machines without installing Swarm there?
* How to use MinGW to compile your own Swarm models, either during model development or so you can distribute working models to others. This requires installing MinGW and our binary Swarm libraries.
* How to package a model compiled with MinGW so it can be installed and run by itself on Windows machines.
* How to use MinGW to compile the Swarm libraries, in case you want to build your own Swarm binaries.
Each topic is more difficult than the one before it. However the topics are independent in that it is not necessary to know how to compile the Swarm library in order to run a pre-compiled Swarm model or compile your own model against a pre-compiled version of Swarm.
= Using Swarm Models Compiled with MinGW =
A model that has been compiled using MinGW can be installed and run from a Windows computer without installing MinGW or Swarm. An example code is this build of Heatbugs:
[http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe]
However, running a Swarm model requires some support programs and libraries. These are available as
<tt>swarm-2.4.1-win32.zip</tt>, available here:
[http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip]
Unzipping that file will create a folder called <tt>swarm</tt> which should be moved somewhere that is easy to remember. The rest of this tutorial will assume this Swarm folder has been placed at <tt>C:\swarm</tt>.
Before a Swarm model can be run, the <tt>swarm\bin</tt> folder must be added to the Windows <tt>PATH</tt> so that Heatbugs can find necessary libraries when it runs. The <tt>swarm\bin</tt> folder can be ''temporarily'' added to the path by executing the following in the Windows command line (the command line is accessed using the program <tt>cmd.exe</tt>):
<pre>path=%PATH%;C:\swarm\bin</pre>
However, it is possible to have conflicts if other versions of libraries used by Swarm, such as HDF5, are already installed and in your path. And some Swarm programs require that the environment variable SWARMHOME be defined, which will typically not be true. These problems can be avoided by using the following statements instead of the above path command:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%</pre>
You can alternatively add the Swarm folder to your <tt>PATH</tt> permanently by editing the Windows PATH environment variable. A tool like [[#RapidEE|RapidEE]] makes doing so easy, or you can use use Windows control panel > System > Advanced > Environment Variables to add <tt>swarm\bin</tt> to the PATH system variable.
Once the path has been set to include the <tt>swarm\bin</tt> folder, Swarm models can be started through the Windows command line, or by double-clicking on them from the Windows Explorer.
The Heatbugs model can now be run by changing the directory of the command line to the folder holding <tt>heatbugs.exe</tt> and then executing the program. For example, if <tt>heatbugs.exe</tt> is located in <tt>C:\Users\example_user\Downloads</tt>, then the model may be run as follows:
<pre>cd C:\Users\example_user\Downloads
heatbugs.exe</pre>
(or you can just double-click on <tt>heatbugs.exe</tt> from Windows Explorer, which temporarily opens a Windows command terminal while the model runs.)
[[Image:Running_Heatbugs.png|frame|none|alt=Running the Heatbugs model]]
You can also create a simple Windows batch file that sets SWARMHOME and the path and then executes the model. Create a file called, for example <tt>heatbugs.bat</tt> in the same directory where <tt>heatbugs.exe</tt> is, containing these lines:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%
heatbugs.exe</pre>
Then, just double-clicking on <tt>heatbugs.bat</tt> will start the model.
If you try this and get an error that some .dll file is not found, then the problem is likely that the path is not set correctly to include the swarm\bin folder. If instead the program crashes without an error statement, then the problem is more likely that SWARMHOME needs to be set.
= Installing Swarm and MinGW to compile models =
To compile Swarm models from source using MinGW, the following simple steps need to be taken to set up the build environment:
* [[#MinGW|Install MinGW using instructions here]]. Currently only 32-bit MinGW can be used with Swarm. Install all components of MinGW.
* Download compiled Swarm binaries, archived as [http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip swarm-2.4.1-win32.zip]. Unzip the archive and place the extracted folder at <tt>C:\swarm</tt>.
'''NOTE:'''
The archived Swarm binaries '''MUST''' be placed at <tt>C:\swarm</tt> to successfully compile Swarm models. This is because some paths had to be hard-coded by <tt>libtool</tt> during the creation of the binaries.
The final step before you can compile a Swarm model is to set the <tt>SWARMHOME</tt> environment variable so that the "make" program knows where to find the Swarm libraries when compiling your code. There are several ways to do this.
*You can temporarily set SWARMHOME by entering this command in the MinGW shell: <pre>export SWARMHOME=/c/swarm</pre>
*You can edit your Makefile so it starts with: <pre>SWARMHOME=/c/swarm</pre>
*Set SWARMHOME permanently as a Windows environment variable, either by using [[#RapidEE|RapidEE]] or Windows control panel > System > Advanced > Environment Variables to add a new (User or System) variable called SWARMHOME with the value <tt>/c/swarm</tt>.
After MinGW has been installed and the Swarm binaries have been downloaded, Swarm models may be compiled using the MinGW shell. Start up the program MinGW Shell, cd to the directory containing your code and Makefile, and enter the command "Make".
An archive of official Swarm example programs can be downloaded from:
[http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
We will use the "Heatbugs" model as an example of how to compile a Swarm application:
<pre>tar xzf /path/to/downloaded/swarmapps-2.3.0.tar.gz
cd swarmapps-2.3.0/objc/heatbugs
make</pre>
'''VERY IMPORTANT NOTE: MinGW produces two executables called <tt>heatbugs.exe</tt>---one in the <tt>heatbugs</tt> folder and another in the <tt>heatbugs/.libs</tt> folder. You should ignore the executable in the top-level folder, <tt>heatbugs/heatbugs.exe</tt>, as it is merely a compiled wrapper script that executes <tt>heatbugs/.libs/heatbugs.exe</tt>. When distributing compiled models, only use binaries from the <tt>.libs</tt> folder.'''
The resulting executable, <tt>.libs/heatbugs.exe</tt> may be executing by following the steps described above at ''Using Swarm Models Compiled with MinGW''. These steps must include setting the Windows Path to include <tt>C:\swarm\bin</tt>.
= Distributing a Swarm Model for Windows Users =
A major benefit of the MinGW version of Swarm is that models can be distributed for people to use without installing Swarm. A simple way to do this, after the model has been compiled and tested using methods in the previous section, is to create a ZIP archive that contains all the files to run the model.
* Create a directory tree that includes the Swarm binary files. For example, create C:\MySwarmModel and add the Swarm binaries (as described [[Swarm_and_MinGW#Using_Swarm_Models_Compiled_with_MinGW|above]]) to it as a subdirectory tree.
* Create another subdirectory that includes just the compiled model.
* Create a third subdirectory that includes any input files that the model needs and a batch file that sets the path and executes the model.
* Zip the whole tree up for distribution.
The directory tree in the zip file looks like this:
<pre>
C:\MySwarmModel\swarm
\bin
\etc
\include
\lib
\man
\share
\executable\MySwarmModel.exe
\Runfiles\MySwarmModel.bat (and any input files)
</pre>
where the file <tt>MySwarmModel.bat</tt> contains:
<pre>
set SWARMHOME=C:\MySwarmModel\swarm
path=%SWARMHOME%\bin;%PATH%
C:\MySwarmModel\executable\MySwarmModel.exe
</pre>
Then users can run the model just by double-clicking on <tt>MySwarmModel.bat</tt>.
= Building Swarm Using MinGW =
This tutorial provides directions and code for compiling your own Swarm libraries for Windows. It is a bit advanced---some familiarity with compiling software from source in a Linux environment and knowledge of the UNIX command line is assumed.
== Install Required Tools ==
The first step is to download and install tools required for compiling Swarm. These links provide directions:
* [[#MinGW|MinGW]]
* [[#Emacs|Emacs]]
* [[#GPerf|GPerf]]
== Build Support Libraries ==
The next steps are to build and install the libraries that Swarm depends on. A ZIP archive containing all the source code required can be found at:
[http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip]
This archive contains two subdirectories:
* sources: This folder contains the source code for each component.
* patches: This folder contains patchfiles that modfy source code so that MinGW can compile it.
After downloading and extracting the source code archive, open up a MinGW shell and run the following commands:
<pre>cd /path/to/where/swarm/source/was/extracted
mkdir build</pre>
The following steps will all assume your MinGW shell is operating out of the <tt>build</tt> directory. All compiled software will be installed to <tt>/c/swarm</tt> (The Windows Explorer will see the folder appear at <tt>C:\swarm</tt>).
=== ZLib ===
ZLib will be the first library to be built as it is a common dependency for many of the other software components. From the <tt>build</tt> directory, execute the following to build Zlib:
<pre>tar xzf ../sources/zlib-1.2.5.tar.gz
cd zlib-1.2.5
make -f win32/Makefile.gcc</pre>
And then the following commands to install ZLib to <tt>/c/swarm</tt>:
<pre>mkdir -p /c/swarm/bin
mkdir -p /c/swarm/include
mkdir -p /c/swarm/lib
cp zlib1.dll /c/swarm/bin/
cp zconf.h zlib.h /c/swarm/include/
mv libzdll.a libz.dll.a
cp *.a /c/swarm/lib</pre>
=== LibPNG ===
LibPNG will be built next as its only dependency is ZLib. From the <tt>build</tt> directory, execute the following steps to build and install LibPNG:
<pre>tar xjf ../sources/libpng-1.5.4.tar.bz2
cd libpng-1.5.4
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm --with-zlib-prefix=/c/swarm
make
make install</pre>
=== XPM ===
Starting from the <tt>build</tt> directory, the XPM library can be built and installed as follows:
<pre>tar xjf ../sources/xpm-nox-4.2.0.tar.bz2
cd xpm-nox-4.2.0
patch -p1 < ../../patches/xpm-nox-4.2.0-mingw-tcl.patch
make CC=gcc
make install prefix=/c/swarm</pre>
'''Summary of patchfile changes:'''
The patchfile is inherited from the SUSE builds of XPM for MinGW and adds Makefiles and other critical components.
One major modification has been made to the SUSE patchfile---<tt>tcl.h</tt> is included in <tt>xpm.h</tt>. This is required in order to use XPM while Tk is installed. Conversely, this means that this build of XPM cannot be used without having Tk installed.
=== LibFFI ===
Starting from the <tt>build</tt> directory, LibFFI can be built and installed as follows:
<pre>tar xzf ../sources/libffi-3.0.9.tar.gz
cd libffi-3.0.9
./configure --prefix=/c/swarm
make
make install</pre>
The LibFFI headers get installed in a weird place.
<pre>mv /c/swarm/lib/libffi-3.0.9/include/*.h /c/swarm/include
rm -rf /c/swarm/lib/libffi-3.0.9</pre>
=== Tcl ===
Starting from the <tt>build</tt> directory, Tcl can be built and installed as follows:
<pre>tar xzf ../sources/tcl8.4.19-src.tar.gz
cd tcl8.4.19
patch -p1 < ../../patches/tcl-8.4.19-fix-lvalues.patch
cd win
./configure --prefix=/c/swarm
make
make install</pre>
'''Summary of patchfile changes:'''
At two places in the TCL source code, an assignment is made while simultaneously performing a typecast. The typecast and the assignment had to be split into separate operations in order to be acceptable to the MinGW compilers.
=== Tk ===
Starting from the <tt>build</tt> directory, Tk can be built and installed as follows:
<pre>tar xzf ../sources/tk8.4.19-src.tar.gz
cd tk8.4.19/win
./configure --prefix=/c/swarm
make
make install</pre>
=== BLT ===
Starting from the <tt>build</tt> directory, BLT can be built and installed as follows:
<pre>tar xzf ../sources/BLT2.4z.tar.gz
cd blt2.4z
./configure --prefix=/c/swarm --without-x
make
make install</pre>
=== HDF5 (Optional) ===
Getting HDF5 to work with MinGW is a little tricky. It is an optional dependency, so if support for reading and writing <tt>.hdf</tt> files is not needed this section can be skipped.
As of version 1.8.7, HDF5 currently does not compile under MinGW. So, we must wrap pre-compiled binaries for use with MinGW. In order to wrap the binaries, we will need an additional tool called <tt>pexports</tt>. This can be installed using <tt>mingw-get</tt>:
<pre>mingw-get install mingw-utils</pre>
Download 32-bit Windows binaries from the HDF website compiled for use with the Visual Studio compilers (these files have "VS" listed under the ''Compilers'' section). After extracting the archive, the HDF5 libraries can be wrapped for use with MinGW by executing the following commands:
<pre>cd path/to/where/HDF5/was/extracted
for dll in `ls dll/*dll`; do
def_file=`basename $dll .dll`.def
lib_file=lib`basename $dll dll.dll`.a
pexports $dll > $def_file
dlltool -d $def_file -l lib/$lib_file
done</pre>
Next, move the libraries and header files needed to use HDF5 from C into <tt>C:\swarm</tt>:
<pre>cp dll/hdf5dll.dll dll/szip.dll /c/swarm/bin
cp include/* /c/swarm/include
cp lib/libhdf5.a /c/swarm/lib</pre>
Finally, a patch must be applied to the HDF header file <tt>H5public.h</tt> so that it doesn't define <tt>ssize_t</tt>---a constant already defined by MinGW. The required patch is contained in the Swarm MinGW source archive:
<pre>cd /path/to/where/swarm/source/was/extracted
patch -p1 -d /c/swarm < patches/hdf5-1.8.7-mingw.patch</pre>
== Build Swarm ==
Finally, the Swarm libraries themselves can be built. From the <tt>build</tt> directory, execute the following
<pre>tar xzf ../sources/swarm-2.4.1.tar.gz
cd swarm-2.4.1
patch -p1 ../../patches/swarm-2.4.1-mingw.patch
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm \
--with-zlibdir=/c/swarm \
--with-pngdir=/c/swarm \
--with-xpmdir=/c/swarm \
--with-ffidir=/c/swarm \
--with-tcl=/c/swarm/lib \
--with-tk=/c/swarm/lib \
--with-bltdir=/c/swarm
cd avcall
gcc -S avcall-i386.c
cd ..
make
make install</pre>
If you wrapped HDF5 up for use with MinGW, add <tt>--with-hdf5dir=/c/swarm</tt> to the list of arguments passed to <tt>configure</tt>.
'''Summary of patchfile changes:'''
<tt>swarm-2.4.1-mingw.patch</tt> modifies the Swarm source code in the following ways:
* <tt>gettimeofday</tt> is no longer defined in the Swarm sources as MinGW includes this function in its standard library.
* Swarm GUI functions are updated to be compatible with LibPNG 1.5.
* The Swarm <tt>configure</tt> script defines <tt>DATADIR</tt> as a preprocessor macro---this conflicts with variables in the GCC Objective-C library. <tt>DATDIR</tt> is <tt>undef</tt>ed in critical parts of the source code.
* The <tt>sleep</tt> function is aliased to <tt>usleep</tt>---which is the name of the MinGW implementation.
* The way in which Makefiles invoke <tt>gperf</tt> is amended so that it actually produces output.
* NULL checks are added to `zstrdup` in src/defobj/internal.m. Some functions in the Swarm library may attempt to call `zstrdup` on a NULL pointer. (This happens if the SWARMHOME environment variable is not set.) Failing to check for this condition can lead to segfaults. `zstrdup` now returns NULL if passed a NULL string or if `alloc` fails to allocate memory for a duplicate.
Full details are contained in the patchfile.
= Tools =
== MinGW ==
'''Homepage:''' http://www.mingw.org
'''Download Area:''' http://sourceforge.net/projects/mingw/files
'''Version Used:''' 20110530
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
[http://www.mingw.org MinGW] is a set of software that aims to provide an environment where software developed on UNIX-like systems can be easily compiled for Windows. Since Swarm is primarily developed on Linux (a UNIX clone), MinGW can ease the task of creating Swarm models that run on Windows.
MinGW is similar to the [http://www.cygwin.org Cygwin] project. The major difference is that MinGW produces executables that depend only on native Windows libraries while Cygwin executables require special compatibility libraries that are part of the Cygwin distribution.
=== Installing MinGW ===
MinGW can be installed by downloading the "Automated MinGW Installer", which usually has a name like <tt>mingw-get-inst-<date>.exe</tt> where <tt><date></tt> is the datestamp for when the installer was packaged. Running this executable will start the installation process. The installer lets you select which optional components to install; make sure all boxes are checked so you '''install all components'''.
[[Image:MinGW_Setup.png|frame|none|alt=Install all available MinGW components]]
The installer downloads all components from the internet. This will take a while, so have a cup of coffee or walk the dog.
See the following section about also installing an optional, more-functional shell window for MinGW.
=== Using MinGW ===
The MinGW compilers are accessible through the "MinGW Shell" which should be located under the MinGW folder in the Start Menu:
[[Image:MinGW_Shell.png|frame|none|alt=Location of MinGW Shell]]
or by running <tt>C:\MinGW\msys\1.0\msys.bat</tt> (if MinGW was installed to its default location).
By default the MinGW shell executes inside of a Windows <tt>cmd.exe</tt> terminal. There are a couple major drawbacks to this:
* You cannot resize the window to full-screen.
* The shell provides limited history scrollback.
MinGW provides a couple of alternative terminals for the MinGW shell which do not have these drawbacks; one of which is called MinTTY. To install MinTTY execute the following in a MinGW shell:
<pre>mingw-get install mintty</pre>
Then the <tt>mintty</tt> command can be used to launch a MinTTY terminal. The MinGW Shell can also be set to launch MinTTY by default by editing the file <tt>C:\MinGW\msys\1.0\msys.bat</tt> and changing the following line (approximately line 58):
<pre>if "x%MSYSCON%" == "xunknown" set MSYSCON=sh.exe</pre>
to:
<pre>if "x%MSYSCON%" == "xunknown" set MSYSCON=mintty.exe</pre>
=== A Note About Paths ===
The MinGW Shell emulates a UNIX <tt>bash</tt> shell and thus uses UNIX-style paths, <tt>/path/to/file</tt>, instead of Windows-style paths, <tt>C:\path\to\file</tt>. One peculiarity of this process is that the shell must deal with the fact that Windows filesystems have multiple roots (<tt>C:</tt>, <tt>D:</tt>, etc.) while a UNIX filesystem only has one root called <tt>/</tt>. The way this is reconciled by the <tt>bash</tt> shell provided with MinGW is that <tt>/c</tt> refers to the root of the <tt>C:</tt> drive, <tt>/d</tt> refers to the root of the <tt>D:</tt> drive and so on and so forth.
The root of the filesystem itself, <tt>/</tt>, also has some caveats. <tt>/</tt> refers to the <tt>mysy</tt> folder, <tt>C:/MinGW/mysys/1.0</tt> in a default installation. <tt>/usr</tt> also refers to the same location. Thus, <tt>/usr/local</tt> and <tt>/local</tt> both refer to <tt>C:/MinGW/mysys/1.0/local</tt>.
=== A Note About MinGW-64 ===
Currently Swarm has been developed and tested against the 32-bit version of MinGW. Hence Swarm models produced this way should run in any version of Windows.
The [MinGW-w64][mingw_65] project produces 64-bit MinGW compilers that can produce 64-bit executables that will only run on 64-bit versions of Windows. These executables benefit from:
* Access to more memory. A 32-bit executable will only be able to allocate ~3 GB of RAM---even if the system has more RAM available.
* Possibly quicker execution speeds due to matching the native architecture of the operating system---however this depends on the types of tasks that the program executes. It has been reported that 64 bit Swarm executables run quicker than 32 bit Swarm executables on Linux.
Currently, no attempt has been made to compile Swarm 2.4.1 with the 64 bit MinGW compilers. If a successful attempt is made, please report it on the [http://www.swarm.org/mailman/listinfo/support Swarm mailing list].
== Emacs ==
'''Homepage:''' http://www.gnu.org/software/emacs
'''Version Used:''' 23.3
'''Download Area:''' http://ftp.gnu.org/gnu/emacs/windows
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GNU Emacs is a text editor that is used by many programmers to edit code. However, Emacs can also be scripted to perform a variety of complicated transformations on text files. The scripts that build the Swarm libraries use Emacs to automate the process of generating some source files. Thus Emacs has to be installed in order to build Swarm from source.
=== Installing Emacs ===
Install Emacs by downloading one of the <tt>emacs-<version
number>-bin-i386.zip</tt> files from the download area. Don't use any of the
files containing <tt>barebin</tt>. After extracting the ZIP archive there will
be an Emacs folder containing a subfolder called <tt>bin</tt>. Add this folder
to your Windows <tt>PATH</tt>. [[#RapidEE|RapidEE]] can help edit the
<tt>PATH</tt> variable.
== GPerf ==
'''Homepage:''' http://www.gnu.org/software/gperf/
'''Download Area:''' http://sourceforge.net/projects/gnuwin32/files/gperf
'''Version Used:''' 3.0.1
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GPerf is a program that produces C code containing hash functions. The scripts
that build the Swarm libraries use GPerf to generate some source code files.
Download <tt>gperf.exe</tt> from the GnuWin32 site on Sourceforge and place it
somewhere on your Windows <tt>PATH</tt>. Again, [[#RapidEE|RapidEE]] can help set the <tt>PATH</tt> variable.
== RapidEE ==
'''Homepage:''' http://www.rapidee.com
'''Version Used:''' 5.0
'''License:''' [http://www.rapidee.com/en/license Freeware]
The Rapid Environment Editor (RapidEE) is a spiffy tool that makes it easy to inspect and alter the value of Windows environment variables, such as the <tt>PATH</tt>. RapidEE may be used to edit "System Variables" which will affect all user accounts or "User Variables" which will affect just the current account. Administrative privileges may be required to edit the System Variables.
[[Image:RapidEE_1.png|frame|none|alt=The different variables RapidEE can edit]]
Right-clicking on the <tt>Path</tt> variable in the System Variables or User Variables will bring up a menu that presents the option to "Add value":
[[Image:RapidEE_2.png|frame|none|alt=Adding a new value to the PATH]]
Once the new entry has been added, RapidEE must be told to save the changes. Command line shells, such as <tt>cmd.exe</tt>, must be restarted in order for them to notice the changes.
[[Image:RapidEE_3.png|frame|none|alt=Adding and saving a value]]
== Depends ==
'''Homepage:''' http://www.dependencywalker.com/
'''Version Used:''' 2.2
'''License:''' Freeware
Depends is a usefull utility that scans Windows executables and reports information concerning the Dynamic-link Libraries (DLLs) that those executables require in order to run.
= Software Used to Compile Swarm 2.4.1 =
{|
! Name
! Verson Used
! License
! Homepage
! Download Area
|-
| ZLib
| 1.2.5
| [http://www.opensource.org/licenses/Zlib ZLib/PNG License]
| [http://www.zlib.net http://www.zlib.net]
| --
|-
| LibFFI
| 3.0.9
| [http://www.opensource.org/licenses/MIT MIT]
| [http://sourceware.org/libffi http://sourceware.org/libffi]
| --
|-
| LibPNG
| 1.5.4
| [http://www.opensource.org/licenses/Zlib ZLib/PNG]
| [http://www.libpng.org/pub/png/libpng.html http://www.libpng.org/pub/png/libpng.html]
| --
|-
| XPM-NoX
| 4.2.0
| [http://www.opensource.org/licenses/MIT MIT]
| unknown
| Try: [http://gnuwin32.sourceforge.net/packages/xpm-nox.htm http://gnuwin32.sourceforge.net/packages/xpm-nox.htm]
|-
| Tcl
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| Tk
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| BLT
| 2.4z
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://blt.sourceforge.net http://blt.sourceforge.net]
| --
|-
| HDF5
| 1.8.7
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://www.hdfgroup.org/HDF5 http://www.hdfgroup.org/HDF5]
| --
|-
| Swarm
| 2.4.1
| [http://www.opensource.org/licenses/GPL-3.0 GPL]
| [http://www.swarm.org http://www.swarm.org]
| [http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
|}
279f4b8a4aca710e35f1e4fcc1e1101b75588328
2174
2173
2015-12-03T01:57:56Z
SwarmWikiSysop
5
wikitext
text/x-wiki
= Overview =
This documentation provides information on how to use Swarm on Windows with [http://www.mingw.org MinGW] compilers. The following topics will be covered:
* How to run a Swam model compiled with MinGW on Windows: Once you produce a Swarm model using MinGW (or someone gives one to you), how do you run it on other machines without installing Swarm there?
* How to use MinGW to compile your own Swarm models, either during model development or so you can distribute working models to others. This requires installing MinGW and our binary Swarm libraries.
* How to package a model compiled with MinGW so it can be installed and run by itself on Windows machines.
* How to use MinGW to compile the Swarm libraries, in case you want to build your own Swarm binaries.
Each topic is more difficult than the one before it. However the topics are independent in that it is not necessary to know how to compile the Swarm library in order to run a pre-compiled Swarm model or compile your own model against a pre-compiled version of Swarm.
= Using Swarm Models Compiled with MinGW =
A model that has been compiled using MinGW can be installed and run from a Windows computer without installing MinGW or Swarm. An example code is this build of Heatbugs:
[http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe]
However, running a Swarm model requires some support programs and libraries. These are available as
<tt>swarm-2.4.1-win32.zip</tt>, available here:
[http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip]
Unzipping that file will create a folder called <tt>swarm</tt> which should be moved somewhere that is easy to remember. The rest of this tutorial will assume this Swarm folder has been placed at <tt>C:\swarm</tt>.
Before a Swarm model can be run, the <tt>swarm\bin</tt> folder must be added to the Windows <tt>PATH</tt> so that Heatbugs can find necessary libraries when it runs. The <tt>swarm\bin</tt> folder can be ''temporarily'' added to the path by executing the following in the Windows command line (the command line is accessed using the program <tt>cmd.exe</tt>):
<pre>path=%PATH%;C:\swarm\bin</pre>
However, it is possible to have conflicts if other versions of libraries used by Swarm, such as HDF5, are already installed and in your path. And some Swarm programs require that the environment variable SWARMHOME be defined, which will typically not be true. These problems can be avoided by using the following statements instead of the above path command:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%</pre>
You can alternatively add the Swarm folder to your <tt>PATH</tt> permanently by editing the Windows PATH environment variable. A tool like [[#RapidEE|RapidEE]] makes doing so easy, or you can use use Windows control panel > System > Advanced > Environment Variables to add <tt>swarm\bin</tt> to the PATH system variable.
Once the path has been set to include the <tt>swarm\bin</tt> folder, Swarm models can be started through the Windows command line, or by double-clicking on them from the Windows Explorer.
The Heatbugs model can now be run by changing the directory of the command line to the folder holding <tt>heatbugs.exe</tt> and then executing the program. For example, if <tt>heatbugs.exe</tt> is located in <tt>C:\Users\example_user\Downloads</tt>, then the model may be run as follows:
<pre>cd C:\Users\example_user\Downloads
heatbugs.exe</pre>
(or you can just double-click on <tt>heatbugs.exe</tt> from Windows Explorer, which temporarily opens a Windows command terminal while the model runs.)
[[Image:Running_Heatbugs.png|frame|none|alt=Running the Heatbugs model]]
You can also create a simple Windows batch file that sets SWARMHOME and the path and then executes the model. Create a file called, for example <tt>heatbugs.bat</tt> in the same directory where <tt>heatbugs.exe</tt> is, containing these lines:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%
heatbugs.exe</pre>
Then, just double-clicking on <tt>heatbugs.bat</tt> will start the model.
If you try this and get an error that some .dll file is not found, then the problem is likely that the path is not set correctly to include the swarm\bin folder. If instead the program crashes without an error statement, then the problem is more likely that SWARMHOME needs to be set.
= Installing Swarm and MinGW to compile models =
To compile Swarm models from source using MinGW, the following simple steps need to be taken to set up the build environment:
* [[#MinGW|Install MinGW using instructions here]]. Currently only 32-bit MinGW can be used with Swarm. Install all components of MinGW.
* Download compiled Swarm binaries, archived as [http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip swarm-2.4.1-win32.zip]. Unzip the archive and place the extracted folder at <tt>C:\swarm</tt>.
'''NOTE:'''
The archived Swarm binaries '''MUST''' be placed at <tt>C:\swarm</tt> to successfully compile Swarm models. This is because some paths had to be hard-coded by <tt>libtool</tt> during the creation of the binaries.
The final step before you can compile a Swarm model is to set the <tt>SWARMHOME</tt> environment variable so that the "make" program knows where to find the Swarm libraries when compiling your code. There are several ways to do this.
*You can temporarily set SWARMHOME by entering this command in the MinGW shell: <pre>export SWARMHOME=/c/swarm</pre>
*You can edit your Makefile so it starts with: <pre>SWARMHOME=/c/swarm</pre>
*Set SWARMHOME permanently as a Windows environment variable, either by using [[#RapidEE|RapidEE]] or Windows control panel > System > Advanced > Environment Variables to add a new (User or System) variable called SWARMHOME with the value <tt>/c/swarm</tt>.
After MinGW has been installed and the Swarm binaries have been downloaded, Swarm models may be compiled using the MinGW shell. Start up the program MinGW Shell, cd to the directory containing your code and Makefile, and enter the command "Make".
An archive of official Swarm example programs can be downloaded from:
[http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
We will use the "Heatbugs" model as an example of how to compile a Swarm application:
<pre>tar xzf /path/to/downloaded/swarmapps-2.3.0.tar.gz
cd swarmapps-2.3.0/objc/heatbugs
make</pre>
'''VERY IMPORTANT NOTE: MinGW produces two executables called <tt>heatbugs.exe</tt>---one in the <tt>heatbugs</tt> folder and another in the <tt>heatbugs/.libs</tt> folder. You should ignore the executable in the top-level folder, <tt>heatbugs/heatbugs.exe</tt>, as it is merely a compiled wrapper script that executes <tt>heatbugs/.libs/heatbugs.exe</tt>. When distributing compiled models, only use binaries from the <tt>.libs</tt> folder.'''
The resulting executable, <tt>.libs/heatbugs.exe</tt> may be executing by following the steps described above at ''Using Swarm Models Compiled with MinGW''. These steps must include setting the Windows Path to include <tt>C:\swarm\bin</tt>.
= Distributing a Swarm Model for Windows Users =
A major benefit of the MinGW version of Swarm is that models can be distributed for people to use without installing Swarm. A simple way to do this, after the model has been compiled and tested using methods in the previous section, is to create a ZIP archive that contains all the files to run the model.
* Create a directory tree that includes the Swarm binary files. For example, create C:\MySwarmModel and add the Swarm binaries (as described [[Swarm_and_MinGW#Using_Swarm_Models_Compiled_with_MinGW|above]]) to it as a subdirectory tree.
* Create another subdirectory that includes just the compiled model.
* Create a third subdirectory that includes any input files that the model needs and a batch file that sets the path and executes the model.
* Zip the whole tree up for distribution.
The directory tree in the zip file looks like this:
<pre>
C:\MySwarmModel\swarm
\bin
\etc
\include
\lib
\man
\share
\executable\MySwarmModel.exe
\Runfiles\MySwarmModel.bat (and any input files)
</pre>
where the file <tt>MySwarmModel.bat</tt> contains:
<pre>
set SWARMHOME=C:\MySwarmModel\swarm
path=%SWARMHOME%\bin;%PATH%
C:\MySwarmModel\executable\MySwarmModel.exe
</pre>
Then users can run the model just by double-clicking on <tt>MySwarmModel.bat</tt>.
= Building Swarm Using MinGW =
This tutorial provides directions and code for compiling your own Swarm libraries for Windows. It is a bit advanced---some familiarity with compiling software from source in a Linux environment and knowledge of the UNIX command line is assumed.
== Install Required Tools ==
The first step is to download and install tools required for compiling Swarm. These links provide directions:
* [[#MinGW|MinGW]]
* [[#Emacs|Emacs]]
* [[#GPerf|GPerf]]
== Build Support Libraries ==
The next steps are to build and install the libraries that Swarm depends on. A ZIP archive containing all the source code required can be found at:
[http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip]
This archive contains two subdirectories:
* sources: This folder contains the source code for each component.
* patches: This folder contains patchfiles that modfy source code so that MinGW can compile it.
After downloading and extracting the source code archive, open up a MinGW shell and run the following commands:
<pre>cd /path/to/where/swarm/source/was/extracted
mkdir build</pre>
The following steps will all assume your MinGW shell is operating out of the <tt>build</tt> directory. All compiled software will be installed to <tt>/c/swarm</tt> (The Windows Explorer will see the folder appear at <tt>C:\swarm</tt>).
=== ZLib ===
ZLib will be the first library to be built as it is a common dependency for many of the other software components. From the <tt>build</tt> directory, execute the following to build Zlib:
<pre>tar xzf ../sources/zlib-1.2.5.tar.gz
cd zlib-1.2.5
make -f win32/Makefile.gcc</pre>
And then the following commands to install ZLib to <tt>/c/swarm</tt>:
<pre>mkdir -p /c/swarm/bin
mkdir -p /c/swarm/include
mkdir -p /c/swarm/lib
cp zlib1.dll /c/swarm/bin/
cp zconf.h zlib.h /c/swarm/include/
mv libzdll.a libz.dll.a
cp *.a /c/swarm/lib</pre>
=== LibPNG ===
LibPNG will be built next as its only dependency is ZLib. From the <tt>build</tt> directory, execute the following steps to build and install LibPNG:
<pre>tar xjf ../sources/libpng-1.5.4.tar.bz2
cd libpng-1.5.4
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm --with-zlib-prefix=/c/swarm
make
make install</pre>
=== XPM ===
Starting from the <tt>build</tt> directory, the XPM library can be built and installed as follows:
<pre>tar xjf ../sources/xpm-nox-4.2.0.tar.bz2
cd xpm-nox-4.2.0
patch -p1 < ../../patches/xpm-nox-4.2.0-mingw-tcl.patch
make CC=gcc
make install prefix=/c/swarm</pre>
'''Summary of patchfile changes:'''
The patchfile is inherited from the SUSE builds of XPM for MinGW and adds Makefiles and other critical components.
One major modification has been made to the SUSE patchfile---<tt>tcl.h</tt> is included in <tt>xpm.h</tt>. This is required in order to use XPM while Tk is installed. Conversely, this means that this build of XPM cannot be used without having Tk installed.
=== LibFFI ===
Starting from the <tt>build</tt> directory, LibFFI can be built and installed as follows:
<pre>tar xzf ../sources/libffi-3.0.9.tar.gz
cd libffi-3.0.9
./configure --prefix=/c/swarm
make
make install</pre>
The LibFFI headers get installed in a weird place.
<pre>mv /c/swarm/lib/libffi-3.0.9/include/*.h /c/swarm/include
rm -rf /c/swarm/lib/libffi-3.0.9</pre>
=== Tcl ===
Starting from the <tt>build</tt> directory, Tcl can be built and installed as follows:
<pre>tar xzf ../sources/tcl8.4.19-src.tar.gz
cd tcl8.4.19
patch -p1 < ../../patches/tcl-8.4.19-fix-lvalues.patch
cd win
./configure --prefix=/c/swarm
make
make install</pre>
'''Summary of patchfile changes:'''
At two places in the TCL source code, an assignment is made while simultaneously performing a typecast. The typecast and the assignment had to be split into separate operations in order to be acceptable to the MinGW compilers.
=== Tk ===
Starting from the <tt>build</tt> directory, Tk can be built and installed as follows:
<pre>tar xzf ../sources/tk8.4.19-src.tar.gz
cd tk8.4.19/win
./configure --prefix=/c/swarm
make
make install</pre>
=== BLT ===
Starting from the <tt>build</tt> directory, BLT can be built and installed as follows:
<pre>tar xzf ../sources/BLT2.4z.tar.gz
cd blt2.4z
./configure --prefix=/c/swarm --without-x
make
make install</pre>
=== HDF5 (Optional) ===
Getting HDF5 to work with MinGW is a little tricky. It is an optional dependency, so if support for reading and writing <tt>.hdf</tt> files is not needed this section can be skipped.
As of version 1.8.7, HDF5 currently does not compile under MinGW. So, we must wrap pre-compiled binaries for use with MinGW. In order to wrap the binaries, we will need an additional tool called <tt>pexports</tt>. This can be installed using <tt>mingw-get</tt>:
<pre>mingw-get install mingw-utils</pre>
Download 32-bit Windows binaries from the HDF website compiled for use with the Visual Studio compilers (these files have "VS" listed under the ''Compilers'' section). After extracting the archive, the HDF5 libraries can be wrapped for use with MinGW by executing the following commands:
<pre>cd path/to/where/HDF5/was/extracted
for dll in `ls dll/*dll`; do
def_file=`basename $dll .dll`.def
lib_file=lib`basename $dll dll.dll`.a
pexports $dll > $def_file
dlltool -d $def_file -l lib/$lib_file
done</pre>
Next, move the libraries and header files needed to use HDF5 from C into <tt>C:\swarm</tt>:
<pre>cp dll/hdf5dll.dll dll/szip.dll /c/swarm/bin
cp include/* /c/swarm/include
cp lib/libhdf5.a /c/swarm/lib</pre>
Finally, a patch must be applied to the HDF header file <tt>H5public.h</tt> so that it doesn't define <tt>ssize_t</tt>---a constant already defined by MinGW. The required patch is contained in the Swarm MinGW source archive:
<pre>cd /path/to/where/swarm/source/was/extracted
patch -p1 -d /c/swarm < patches/hdf5-1.8.7-mingw.patch</pre>
== Build Swarm ==
Finally, the Swarm libraries themselves can be built. From the <tt>build</tt> directory, execute the following
<pre>tar xzf ../sources/swarm-2.4.1.tar.gz
cd swarm-2.4.1
patch -p1 ../../patches/swarm-2.4.1-mingw.patch
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm \
--with-zlibdir=/c/swarm \
--with-pngdir=/c/swarm \
--with-xpmdir=/c/swarm \
--with-ffidir=/c/swarm \
--with-tcl=/c/swarm/lib \
--with-tk=/c/swarm/lib \
--with-bltdir=/c/swarm
cd avcall
gcc -S avcall-i386.c
cd ..
make
make install</pre>
If you wrapped HDF5 up for use with MinGW, add <tt>--with-hdf5dir=/c/swarm</tt> to the list of arguments passed to <tt>configure</tt>.
'''Summary of patchfile changes:'''
<tt>swarm-2.4.1-mingw.patch</tt> modifies the Swarm source code in the following ways:
* <tt>gettimeofday</tt> is no longer defined in the Swarm sources as MinGW includes this function in its standard library.
* Swarm GUI functions are updated to be compatible with LibPNG 1.5.
* The Swarm <tt>configure</tt> script defines <tt>DATADIR</tt> as a preprocessor macro---this conflicts with variables in the GCC Objective-C library. <tt>DATDIR</tt> is <tt>undef</tt>ed in critical parts of the source code.
* The <tt>sleep</tt> function is aliased to <tt>usleep</tt>---which is the name of the MinGW implementation.
* The way in which Makefiles invoke <tt>gperf</tt> is amended so that it actually produces output.
* NULL checks are added to `zstrdup` in src/defobj/internal.m. Some functions in the Swarm library may attempt to call `zstrdup` on a NULL pointer. (This happens if the SWARMHOME environment variable is not set.) Failing to check for this condition can lead to segfaults. `zstrdup` now returns NULL if passed a NULL string or if `alloc` fails to allocate memory for a duplicate.
Full details are contained in the patchfile.
= Tools =
== MinGW ==
'''Homepage:''' http://www.mingw.org
'''Download Area:''' http://sourceforge.net/projects/mingw/files
'''Version Used:''' 20110530
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
[http://www.mingw.org MinGW] is a set of software that aims to provide an environment where software developed on UNIX-like systems can be easily compiled for Windows. Since Swarm is primarily developed on Linux (a UNIX clone), MinGW can ease the task of creating Swarm models that run on Windows.
MinGW is similar to the [http://www.cygwin.org Cygwin] project. The major difference is that MinGW produces executables that depend only on native Windows libraries while Cygwin executables require special compatibility libraries that are part of the Cygwin distribution.
=== Installing MinGW ===
MinGW can be installed by downloading the "Automated MinGW Installer", which usually has a name like <tt>mingw-get-inst-<date>.exe</tt> where <tt><date></tt> is the datestamp for when the installer was packaged. Running this executable will start the installation process. The installer lets you select which optional components to install; make sure all boxes are checked so you '''install all components'''.
[[Image:MinGW_Setup.png|frame|none|alt=Install all available MinGW components]]
The installer downloads all components from the internet. This will take a while, so have a cup of coffee or walk the dog.
See the following section about also installing an optional, more-functional shell window for MinGW.
=== Using MinGW ===
The MinGW compilers are accessible through the "MinGW Shell" which should be located under the MinGW folder in the Start Menu:
[[Image:MinGW_Shell.png|frame|none|alt=Location of MinGW Shell]]
or by running <tt>C:\MinGW\msys\1.0\msys.bat</tt> (if MinGW was installed to its default location).
By default the MinGW shell executes inside of a Windows <tt>cmd.exe</tt> terminal. There are a couple major drawbacks to this:
* You cannot resize the window to full-screen.
* The shell provides limited history scrollback.
MinGW provides a couple of alternative terminals for the MinGW shell which do not have these drawbacks; one of which is called MinTTY. To install MinTTY execute the following in a MinGW shell:
<pre>mingw-get install mintty</pre>
Then the <tt>mintty</tt> command can be used to launch a MinTTY terminal. The MinGW Shell can also be set to launch MinTTY by default by editing the file <tt>C:\MinGW\msys\1.0\msys.bat</tt> and changing the following line (approximately line 58):
<pre>if "x%MSYSCON%" == "xunknown" set MSYSCON=sh.exe</pre>
to:
<pre>if "x%MSYSCON%" == "xunknown" set MSYSCON=mintty.exe</pre>
=== A Note About Paths ===
The MinGW Shell emulates a UNIX <tt>bash</tt> shell and thus uses UNIX-style paths, <tt>/path/to/file</tt>, instead of Windows-style paths, <tt>C:\path\to\file</tt>. One peculiarity of this process is that the shell must deal with the fact that Windows filesystems have multiple roots (<tt>C:</tt>, <tt>D:</tt>, etc.) while a UNIX filesystem only has one root called <tt>/</tt>. The way this is reconciled by the <tt>bash</tt> shell provided with MinGW is that <tt>/c</tt> refers to the root of the <tt>C:</tt> drive, <tt>/d</tt> refers to the root of the <tt>D:</tt> drive and so on and so forth.
The root of the filesystem itself, <tt>/</tt>, also has some caveats. <tt>/</tt> refers to the <tt>mysy</tt> folder, <tt>C:/MinGW/mysys/1.0</tt> in a default installation. <tt>/usr</tt> also refers to the same location. Thus, <tt>/usr/local</tt> and <tt>/local</tt> both refer to <tt>C:/MinGW/mysys/1.0/local</tt>.
=== A Note About MinGW-64 ===
Currently Swarm has been developed and tested against the 32-bit version of MinGW. Hence Swarm models produced this way should run in any version of Windows.
The [MinGW-w64][mingw_65] project produces 64-bit MinGW compilers that can produce 64-bit executables that will only run on 64-bit versions of Windows. These executables benefit from:
* Access to more memory. A 32-bit executable will only be able to allocate ~3 GB of RAM---even if the system has more RAM available.
* Possibly quicker execution speeds due to matching the native architecture of the operating system---however this depends on the types of tasks that the program executes. It has been reported that 64 bit Swarm executables run quicker than 32 bit Swarm executables on Linux.
Currently, no attempt has been made to compile Swarm 2.4.1 with the 64 bit MinGW compilers. If a successful attempt is made, please report it on the [http://www.swarm.org/mailman/listinfo/support Swarm mailing list].
== Emacs ==
'''Homepage:''' http://www.gnu.org/software/emacs
'''Version Used:''' 23.3
'''Download Area:''' http://ftp.gnu.org/gnu/emacs/windows
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GNU Emacs is a text editor that is used by many programmers to edit code. However, Emacs can also be scripted to perform a variety of complicated transformations on text files. The scripts that build the Swarm libraries use Emacs to automate the process of generating some source files. Thus Emacs has to be installed in order to build Swarm from source.
=== Installing Emacs ===
Install Emacs by downloading one of the <tt>emacs-<version
number>-bin-i386.zip</tt> files from the download area. Don't use any of the
files containing <tt>barebin</tt>. After extracting the ZIP archive there will
be an Emacs folder containing a subfolder called <tt>bin</tt>. Add this folder
to your Windows <tt>PATH</tt>. [[#RapidEE|RapidEE]] can help edit the
<tt>PATH</tt> variable.
== GPerf ==
'''Homepage:''' http://www.gnu.org/software/gperf/
'''Download Area:''' http://sourceforge.net/projects/gnuwin32/files/gperf
'''Version Used:''' 3.0.1
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GPerf is a program that produces C code containing hash functions. The scripts
that build the Swarm libraries use GPerf to generate some source code files.
Download <tt>gperf.exe</tt> from the GnuWin32 site on Sourceforge and place it
somewhere on your Windows <tt>PATH</tt>. Again, [[#RapidEE|RapidEE]] can help set the <tt>PATH</tt> variable.
== RapidEE ==
'''Homepage:''' http://www.rapidee.com
'''Version Used:''' 5.0
'''License:''' [http://www.rapidee.com/en/license Freeware]
The Rapid Environment Editor (RapidEE) is a spiffy tool that makes it easy to inspect and alter the value of Windows environment variables, such as the <tt>PATH</tt>. RapidEE may be used to edit "System Variables" which will affect all user accounts or "User Variables" which will affect just the current account. Administrative privileges may be required to edit the System Variables.
[[Image:RapidEE_1.png|frame|none|alt=The different variables RapidEE can edit]]
Right-clicking on the <tt>Path</tt> variable in the System Variables or User Variables will bring up a menu that presents the option to "Add value":
[[Image:RapidEE_2.png|frame|none|alt=Adding a new value to the PATH]]
Once the new entry has been added, RapidEE must be told to save the changes. Command line shells, such as <tt>cmd.exe</tt>, must be restarted in order for them to notice the changes.
[[Image:RapidEE_3.png|frame|none|alt=Adding and saving a value]]
== Depends ==
'''Homepage:''' http://www.dependencywalker.com/
'''Version Used:''' 2.2
'''License:''' Freeware
Depends is a usefull utility that scans Windows executables and reports information concerning the Dynamic-link Libraries (DLLs) that those executables require in order to run.
= Software Used to Compile Swarm 2.4.1 =
{|
! Name
! Verson Used
! License
! Homepage
! Download Area
|-
| ZLib
| 1.2.5
| [http://www.opensource.org/licenses/Zlib ZLib/PNG License]
| [http://www.zlib.net http://www.zlib.net]
| --
|-
| LibFFI
| 3.0.9
| [http://www.opensource.org/licenses/MIT MIT]
| [http://sourceware.org/libffi http://sourceware.org/libffi]
| --
|-
| LibPNG
| 1.5.4
| [http://www.opensource.org/licenses/Zlib ZLib/PNG]
| [http://www.libpng.org/pub/png/libpng.html http://www.libpng.org/pub/png/libpng.html]
| --
|-
| XPM-NoX
| 4.2.0
| [http://www.opensource.org/licenses/MIT MIT]
| unknown
| [http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32 http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32]
|-
| Tcl
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| Tk
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| BLT
| 2.4z
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://blt.sourceforge.net http://blt.sourceforge.net]
| --
|-
| HDF5
| 1.8.7
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://www.hdfgroup.org/HDF5 http://www.hdfgroup.org/HDF5]
| --
|-
| Swarm
| 2.4.1
| [http://www.opensource.org/licenses/GPL-3.0 GPL]
| [http://www.swarm.org http://www.swarm.org]
| [http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
|}
2660f0dc613b8fe7949d1d2fe811a945dee599d9
2173
2172
2015-12-03T01:55:33Z
SwarmWikiSysop
5
/* Installing Emacs */
wikitext
text/x-wiki
= Overview =
This documentation provides information on how to use Swarm on Windows with [http://www.mingw.org MinGW] compilers. The following topics will be covered:
* How to run a Swam model compiled with MinGW on Windows: Once you produce a Swarm model using MinGW (or someone gives one to you), how do you run it on other machines without installing Swarm there?
* How to use MinGW to compile your own Swarm models, either during model development or so you can distribute working models to others. This requires installing MinGW and our binary Swarm libraries.
* How to package a model compiled with MinGW so it can be installed and run by itself on Windows machines.
* How to use MinGW to compile the Swarm libraries, in case you want to build your own Swarm binaries.
Each topic is more difficult than the one before it. However the topics are independent in that it is not necessary to know how to compile the Swarm library in order to run a pre-compiled Swarm model or compile your own model against a pre-compiled version of Swarm.
= Using Swarm Models Compiled with MinGW =
A model that has been compiled using MinGW can be installed and run from a Windows computer without installing MinGW or Swarm. An example code is this build of Heatbugs:
[http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe]
However, running a Swarm model requires some support programs and libraries. These are available as
<tt>swarm-2.4.1-win32.zip</tt>, available here:
[http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip]
Unzipping that file will create a folder called <tt>swarm</tt> which should be moved somewhere that is easy to remember. The rest of this tutorial will assume this Swarm folder has been placed at <tt>C:\swarm</tt>.
Before a Swarm model can be run, the <tt>swarm\bin</tt> folder must be added to the Windows <tt>PATH</tt> so that Heatbugs can find necessary libraries when it runs. The <tt>swarm\bin</tt> folder can be ''temporarily'' added to the path by executing the following in the Windows command line (the command line is accessed using the program <tt>cmd.exe</tt>):
<pre>path=%PATH%;C:\swarm\bin</pre>
However, it is possible to have conflicts if other versions of libraries used by Swarm, such as HDF5, are already installed and in your path. And some Swarm programs require that the environment variable SWARMHOME be defined, which will typically not be true. These problems can be avoided by using the following statements instead of the above path command:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%</pre>
You can alternatively add the Swarm folder to your <tt>PATH</tt> permanently by editing the Windows PATH environment variable. A tool like [[#RapidEE|RapidEE]] makes doing so easy, or you can use use Windows control panel > System > Advanced > Environment Variables to add <tt>swarm\bin</tt> to the PATH system variable.
Once the path has been set to include the <tt>swarm\bin</tt> folder, Swarm models can be started through the Windows command line, or by double-clicking on them from the Windows Explorer.
The Heatbugs model can now be run by changing the directory of the command line to the folder holding <tt>heatbugs.exe</tt> and then executing the program. For example, if <tt>heatbugs.exe</tt> is located in <tt>C:\Users\example_user\Downloads</tt>, then the model may be run as follows:
<pre>cd C:\Users\example_user\Downloads
heatbugs.exe</pre>
(or you can just double-click on <tt>heatbugs.exe</tt> from Windows Explorer, which temporarily opens a Windows command terminal while the model runs.)
[[Image:Running_Heatbugs.png|frame|none|alt=Running the Heatbugs model]]
You can also create a simple Windows batch file that sets SWARMHOME and the path and then executes the model. Create a file called, for example <tt>heatbugs.bat</tt> in the same directory where <tt>heatbugs.exe</tt> is, containing these lines:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%
heatbugs.exe</pre>
Then, just double-clicking on <tt>heatbugs.bat</tt> will start the model.
If you try this and get an error that some .dll file is not found, then the problem is likely that the path is not set correctly to include the swarm\bin folder. If instead the program crashes without an error statement, then the problem is more likely that SWARMHOME needs to be set.
= Installing Swarm and MinGW to compile models =
To compile Swarm models from source using MinGW, the following simple steps need to be taken to set up the build environment:
* [[#MinGW|Install MinGW using instructions here]]. Currently only 32-bit MinGW can be used with Swarm. Install all components of MinGW.
* Download compiled Swarm binaries, archived as [http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip swarm-2.4.1-win32.zip]. Unzip the archive and place the extracted folder at <tt>C:\swarm</tt>.
'''NOTE:'''
The archived Swarm binaries '''MUST''' be placed at <tt>C:\swarm</tt> to successfully compile Swarm models. This is because some paths had to be hard-coded by <tt>libtool</tt> during the creation of the binaries.
The final step before you can compile a Swarm model is to set the <tt>SWARMHOME</tt> environment variable so that the "make" program knows where to find the Swarm libraries when compiling your code. There are several ways to do this.
*You can temporarily set SWARMHOME by entering this command in the MinGW shell: <pre>export SWARMHOME=/c/swarm</pre>
*You can edit your Makefile so it starts with: <pre>SWARMHOME=/c/swarm</pre>
*Set SWARMHOME permanently as a Windows environment variable, either by using [[#RapidEE|RapidEE]] or Windows control panel > System > Advanced > Environment Variables to add a new (User or System) variable called SWARMHOME with the value <tt>/c/swarm</tt>.
After MinGW has been installed and the Swarm binaries have been downloaded, Swarm models may be compiled using the MinGW shell. Start up the program MinGW Shell, cd to the directory containing your code and Makefile, and enter the command "Make".
An archive of official Swarm example programs can be downloaded from:
[http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
We will use the "Heatbugs" model as an example of how to compile a Swarm application:
<pre>tar xzf /path/to/downloaded/swarmapps-2.3.0.tar.gz
cd swarmapps-2.3.0/objc/heatbugs
make</pre>
'''VERY IMPORTANT NOTE: MinGW produces two executables called <tt>heatbugs.exe</tt>---one in the <tt>heatbugs</tt> folder and another in the <tt>heatbugs/.libs</tt> folder. You should ignore the executable in the top-level folder, <tt>heatbugs/heatbugs.exe</tt>, as it is merely a compiled wrapper script that executes <tt>heatbugs/.libs/heatbugs.exe</tt>. When distributing compiled models, only use binaries from the <tt>.libs</tt> folder.'''
The resulting executable, <tt>.libs/heatbugs.exe</tt> may be executing by following the steps described above at ''Using Swarm Models Compiled with MinGW''. These steps must include setting the Windows Path to include <tt>C:\swarm\bin</tt>.
= Distributing a Swarm Model for Windows Users =
A major benefit of the MinGW version of Swarm is that models can be distributed for people to use without installing Swarm. A simple way to do this, after the model has been compiled and tested using methods in the previous section, is to create a ZIP archive that contains all the files to run the model.
* Create a directory tree that includes the Swarm binary files. For example, create C:\MySwarmModel and add the Swarm binaries (as described [[Swarm_and_MinGW#Using_Swarm_Models_Compiled_with_MinGW|above]]) to it as a subdirectory tree.
* Create another subdirectory that includes just the compiled model.
* Create a third subdirectory that includes any input files that the model needs and a batch file that sets the path and executes the model.
* Zip the whole tree up for distribution.
The directory tree in the zip file looks like this:
<pre>
C:\MySwarmModel\swarm
\bin
\etc
\include
\lib
\man
\share
\executable\MySwarmModel.exe
\Runfiles\MySwarmModel.bat (and any input files)
</pre>
where the file <tt>MySwarmModel.bat</tt> contains:
<pre>
set SWARMHOME=C:\MySwarmModel\swarm
path=%SWARMHOME%\bin;%PATH%
C:\MySwarmModel\executable\MySwarmModel.exe
</pre>
Then users can run the model just by double-clicking on <tt>MySwarmModel.bat</tt>.
= Building Swarm Using MinGW =
This tutorial provides directions and code for compiling your own Swarm libraries for Windows. It is a bit advanced---some familiarity with compiling software from source in a Linux environment and knowledge of the UNIX command line is assumed.
== Install Required Tools ==
The first step is to download and install tools required for compiling Swarm. These links provide directions:
* [[#MinGW|MinGW]]
* [[#Emacs|Emacs]]
* [[#GPerf|GPerf]]
== Build Support Libraries ==
The next steps are to build and install the libraries that Swarm depends on. A ZIP archive containing all the source code required can be found at:
[http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip]
This archive contains two subdirectories:
* sources: This folder contains the source code for each component.
* patches: This folder contains patchfiles that modfy source code so that MinGW can compile it.
After downloading and extracting the source code archive, open up a MinGW shell and run the following commands:
<pre>cd /path/to/where/swarm/source/was/extracted
mkdir build</pre>
The following steps will all assume your MinGW shell is operating out of the <tt>build</tt> directory. All compiled software will be installed to <tt>/c/swarm</tt> (The Windows Explorer will see the folder appear at <tt>C:\swarm</tt>).
=== ZLib ===
ZLib will be the first library to be built as it is a common dependency for many of the other software components. From the <tt>build</tt> directory, execute the following to build Zlib:
<pre>tar xzf ../sources/zlib-1.2.5.tar.gz
cd zlib-1.2.5
make -f win32/Makefile.gcc</pre>
And then the following commands to install ZLib to <tt>/c/swarm</tt>:
<pre>mkdir -p /c/swarm/bin
mkdir -p /c/swarm/include
mkdir -p /c/swarm/lib
cp zlib1.dll /c/swarm/bin/
cp zconf.h zlib.h /c/swarm/include/
mv libzdll.a libz.dll.a
cp *.a /c/swarm/lib</pre>
=== LibPNG ===
LibPNG will be built next as its only dependency is ZLib. From the <tt>build</tt> directory, execute the following steps to build and install LibPNG:
<pre>tar xjf ../sources/libpng-1.5.4.tar.bz2
cd libpng-1.5.4
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm --with-zlib-prefix=/c/swarm
make
make install</pre>
=== XPM ===
Starting from the <tt>build</tt> directory, the XPM library can be built and installed as follows:
<pre>tar xjf ../sources/xpm-nox-4.2.0.tar.bz2
cd xpm-nox-4.2.0
patch -p1 &lt; ../../patches/xpm-nox-4.2.0-mingw-tcl.patch
make CC=gcc
make install prefix=/c/swarm</pre>
'''Summary of patchfile changes:'''
The patchfile is inherited from the SUSE builds of XPM for MinGW and adds Makefiles and other critical components.
One major modification has been made to the SUSE patchfile---<tt>tcl.h</tt> is included in <tt>xpm.h</tt>. This is required in order to use XPM while Tk is installed. Conversely, this means that this build of XPM cannot be used without having Tk installed.
=== LibFFI ===
Starting from the <tt>build</tt> directory, LibFFI can be built and installed as follows:
<pre>tar xzf ../sources/libffi-3.0.9.tar.gz
cd libffi-3.0.9
./configure --prefix=/c/swarm
make
make install</pre>
The LibFFI headers get installed in a weird place.
<pre>mv /c/swarm/lib/libffi-3.0.9/include/*.h /c/swarm/include
rm -rf /c/swarm/lib/libffi-3.0.9</pre>
=== Tcl ===
Starting from the <tt>build</tt> directory, Tcl can be built and installed as follows:
<pre>tar xzf ../sources/tcl8.4.19-src.tar.gz
cd tcl8.4.19
patch -p1 &lt; ../../patches/tcl-8.4.19-fix-lvalues.patch
cd win
./configure --prefix=/c/swarm
make
make install</pre>
'''Summary of patchfile changes:'''
At two places in the TCL source code, an assignment is made while simultaneously performing a typecast. The typecast and the assignment had to be split into separate operations in order to be acceptable to the MinGW compilers.
=== Tk ===
Starting from the <tt>build</tt> directory, Tk can be built and installed as follows:
<pre>tar xzf ../sources/tk8.4.19-src.tar.gz
cd tk8.4.19/win
./configure --prefix=/c/swarm
make
make install</pre>
=== BLT ===
Starting from the <tt>build</tt> directory, BLT can be built and installed as follows:
<pre>tar xzf ../sources/BLT2.4z.tar.gz
cd blt2.4z
./configure --prefix=/c/swarm --without-x
make
make install</pre>
=== HDF5 (Optional) ===
Getting HDF5 to work with MinGW is a little tricky. It is an optional dependency, so if support for reading and writing <tt>.hdf</tt> files is not needed this section can be skipped.
As of version 1.8.7, HDF5 currently does not compile under MinGW. So, we must wrap pre-compiled binaries for use with MinGW. In order to wrap the binaries, we will need an additional tool called <tt>pexports</tt>. This can be installed using <tt>mingw-get</tt>:
<pre>mingw-get install mingw-utils</pre>
Download 32-bit Windows binaries from the HDF website compiled for use with the Visual Studio compilers (these files have "VS" listed under the ''Compilers'' section). After extracting the archive, the HDF5 libraries can be wrapped for use with MinGW by executing the following commands:
<pre>cd path/to/where/HDF5/was/extracted
for dll in `ls dll/*dll`; do
def_file=`basename $dll .dll`.def
lib_file=lib`basename $dll dll.dll`.a
pexports $dll &gt; $def_file
dlltool -d $def_file -l lib/$lib_file
done</pre>
Next, move the libraries and header files needed to use HDF5 from C into <tt>C:\swarm</tt>:
<pre>cp dll/hdf5dll.dll dll/szip.dll /c/swarm/bin
cp include/* /c/swarm/include
cp lib/libhdf5.a /c/swarm/lib</pre>
Finally, a patch must be applied to the HDF header file <tt>H5public.h</tt> so that it doesn't define <tt>ssize_t</tt>---a constant already defined by MinGW. The required patch is contained in the Swarm MinGW source archive:
<pre>cd /path/to/where/swarm/source/was/extracted
patch -p1 -d /c/swarm &lt; patches/hdf5-1.8.7-mingw.patch</pre>
== Build Swarm ==
Finally, the Swarm libraries themselves can be built. From the <tt>build</tt> directory, execute the following
<pre>tar xzf ../sources/swarm-2.4.1.tar.gz
cd swarm-2.4.1
patch -p1 ../../patches/swarm-2.4.1-mingw.patch
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm \
--with-zlibdir=/c/swarm \
--with-pngdir=/c/swarm \
--with-xpmdir=/c/swarm \
--with-ffidir=/c/swarm \
--with-tcl=/c/swarm/lib \
--with-tk=/c/swarm/lib \
--with-bltdir=/c/swarm
cd avcall
gcc -S avcall-i386.c
cd ..
make
make install</pre>
If you wrapped HDF5 up for use with MinGW, add <tt>--with-hdf5dir=/c/swarm</tt> to the list of arguments passed to <tt>configure</tt>.
'''Summary of patchfile changes:'''
<tt>swarm-2.4.1-mingw.patch</tt> modifies the Swarm source code in the following ways:
* <tt>gettimeofday</tt> is no longer defined in the Swarm sources as MinGW includes this function in its standard library.
* Swarm GUI functions are updated to be compatible with LibPNG 1.5.
* The Swarm <tt>configure</tt> script defines <tt>DATADIR</tt> as a preprocessor macro---this conflicts with variables in the GCC Objective-C library. <tt>DATDIR</tt> is <tt>undef</tt>ed in critical parts of the source code.
* The <tt>sleep</tt> function is aliased to <tt>usleep</tt>---which is the name of the MinGW implementation.
* The way in which Makefiles invoke <tt>gperf</tt> is amended so that it actually produces output.
* NULL checks are added to `zstrdup` in src/defobj/internal.m. Some functions in the Swarm library may attempt to call `zstrdup` on a NULL pointer. (This happens if the SWARMHOME environment variable is not set.) Failing to check for this condition can lead to segfaults. `zstrdup` now returns NULL if passed a NULL string or if `alloc` fails to allocate memory for a duplicate.
Full details are contained in the patchfile.
= Tools =
== MinGW ==
'''Homepage:''' http://www.mingw.org
'''Download Area:''' http://sourceforge.net/projects/mingw/files
'''Version Used:''' 20110530
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
[http://www.mingw.org MinGW] is a set of software that aims to provide an environment where software developed on UNIX-like systems can be easily compiled for Windows. Since Swarm is primarily developed on Linux (a UNIX clone), MinGW can ease the task of creating Swarm models that run on Windows.
MinGW is similar to the [http://www.cygwin.org Cygwin] project. The major difference is that MinGW produces executables that depend only on native Windows libraries while Cygwin executables require special compatibility libraries that are part of the Cygwin distribution.
=== Installing MinGW ===
MinGW can be installed by downloading the "Automated MinGW Installer", which usually has a name like <tt>mingw-get-inst-&lt;date&gt;.exe</tt> where <tt>&lt;date&gt;</tt> is the datestamp for when the installer was packaged. Running this executable will start the installation process. The installer lets you select which optional components to install; make sure all boxes are checked so you '''install all components'''.
[[Image:MinGW_Setup.png|frame|none|alt=Install all available MinGW components]]
The installer downloads all components from the internet. This will take a while, so have a cup of coffee or walk the dog.
See the following section about also installing an optional, more-functional shell window for MinGW.
=== Using MinGW ===
The MinGW compilers are accessible through the "MinGW Shell" which should be located under the MinGW folder in the Start Menu:
[[Image:MinGW_Shell.png|frame|none|alt=Location of MinGW Shell]]
or by running <tt>C:\MinGW\msys\1.0\msys.bat</tt> (if MinGW was installed to its default location).
By default the MinGW shell executes inside of a Windows <tt>cmd.exe</tt> terminal. There are a couple major drawbacks to this:
* You cannot resize the window to full-screen.
* The shell provides limited history scrollback.
MinGW provides a couple of alternative terminals for the MinGW shell which do not have these drawbacks; one of which is called MinTTY. To install MinTTY execute the following in a MinGW shell:
<pre>mingw-get install mintty</pre>
Then the <tt>mintty</tt> command can be used to launch a MinTTY terminal. The MinGW Shell can also be set to launch MinTTY by default by editing the file <tt>C:\MinGW\msys\1.0\msys.bat</tt> and changing the following line (approximately line 58):
<pre>if "x%MSYSCON%" == "xunknown" set MSYSCON=sh.exe</pre>
to:
<pre>if "x%MSYSCON%" == "xunknown" set MSYSCON=mintty.exe</pre>
=== A Note About Paths ===
The MinGW Shell emulates a UNIX <tt>bash</tt> shell and thus uses UNIX-style paths, <tt>/path/to/file</tt>, instead of Windows-style paths, <tt>C:\path\to\file</tt>. One peculiarity of this process is that the shell must deal with the fact that Windows filesystems have multiple roots (<tt>C:</tt>, <tt>D:</tt>, etc.) while a UNIX filesystem only has one root called <tt>/</tt>. The way this is reconciled by the <tt>bash</tt> shell provided with MinGW is that <tt>/c</tt> refers to the root of the <tt>C:</tt> drive, <tt>/d</tt> refers to the root of the <tt>D:</tt> drive and so on and so forth.
The root of the filesystem itself, <tt>/</tt>, also has some caveats. <tt>/</tt> refers to the <tt>mysy</tt> folder, <tt>C:/MinGW/mysys/1.0</tt> in a default installation. <tt>/usr</tt> also refers to the same location. Thus, <tt>/usr/local</tt> and <tt>/local</tt> both refer to <tt>C:/MinGW/mysys/1.0/local</tt>.
=== A Note About MinGW-64 ===
Currently Swarm has been developed and tested against the 32-bit version of MinGW. Hence Swarm models produced this way should run in any version of Windows.
The [MinGW-w64][mingw_65] project produces 64-bit MinGW compilers that can produce 64-bit executables that will only run on 64-bit versions of Windows. These executables benefit from:
* Access to more memory. A 32-bit executable will only be able to allocate ~3 GB of RAM---even if the system has more RAM available.
* Possibly quicker execution speeds due to matching the native architecture of the operating system---however this depends on the types of tasks that the program executes. It has been reported that 64 bit Swarm executables run quicker than 32 bit Swarm executables on Linux.
Currently, no attempt has been made to compile Swarm 2.4.1 with the 64 bit MinGW compilers. If a successful attempt is made, please report it on the [http://www.swarm.org/mailman/listinfo/support Swarm mailing list].
== Emacs ==
'''Homepage:''' http://www.gnu.org/software/emacs
'''Version Used:''' 23.3
'''Download Area:''' http://ftp.gnu.org/gnu/emacs/windows
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GNU Emacs is a text editor that is used by many programmers to edit code. However, Emacs can also be scripted to perform a variety of complicated transformations on text files. The scripts that build the Swarm libraries use Emacs to automate the process of generating some source files. Thus Emacs has to be installed in order to build Swarm from source.
=== Installing Emacs ===
Install Emacs by downloading one of the <tt>emacs-<version
number>-bin-i386.zip</tt> files from the download area. Don't use any of the
files containing <tt>barebin</tt>. After extracting the ZIP archive there will
be an Emacs folder containing a subfolder called <tt>bin</tt>. Add this folder
to your Windows <tt>PATH</tt>. [[#RapidEE|RapidEE]] can help edit the
<tt>PATH</tt> variable.
== GPerf ==
'''Homepage:''' http://www.gnu.org/software/gperf/
'''Download Area:''' http://sourceforge.net/projects/gnuwin32/files/gperf
'''Version Used:''' 3.0.1
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GPerf is a program that produces C code containing hash functions. The scripts
that build the Swarm libraries use GPerf to generate some source code files.
Download <tt>gperf.exe</tt> from the GnuWin32 site on Sourceforge and place it
somewhere on your Windows <tt>PATH</tt>. Again, [[#RapidEE|RapidEE]] can help set the <tt>PATH</tt> variable.
== RapidEE ==
'''Homepage:''' http://www.rapidee.com
'''Version Used:''' 5.0
'''License:''' [http://www.rapidee.com/en/license Freeware]
The Rapid Environment Editor (RapidEE) is a spiffy tool that makes it easy to inspect and alter the value of Windows environment variables, such as the <tt>PATH</tt>. RapidEE may be used to edit "System Variables" which will affect all user accounts or "User Variables" which will affect just the current account. Administrative privileges may be required to edit the System Variables.
[[Image:RapidEE_1.png|frame|none|alt=The different variables RapidEE can edit]]
Right-clicking on the <tt>Path</tt> variable in the System Variables or User Variables will bring up a menu that presents the option to "Add value":
[[Image:RapidEE_2.png|frame|none|alt=Adding a new value to the PATH]]
Once the new entry has been added, RapidEE must be told to save the changes. Command line shells, such as <tt>cmd.exe</tt>, must be restarted in order for them to notice the changes.
[[Image:RapidEE_3.png|frame|none|alt=Adding and saving a value]]
== Depends ==
'''Homepage:''' http://www.dependencywalker.com/
'''Version Used:''' 2.2
'''License:''' Freeware
Depends is a usefull utility that scans Windows executables and reports information concerning the Dynamic-link Libraries (DLLs) that those executables require in order to run.
= Software Used to Compile Swarm 2.4.1 =
{|
! Name
! Verson Used
! License
! Homepage
! Download Area
|-
| ZLib
| 1.2.5
| [http://www.opensource.org/licenses/Zlib ZLib/PNG License]
| [http://www.zlib.net http://www.zlib.net]
| --
|-
| LibFFI
| 3.0.9
| [http://www.opensource.org/licenses/MIT MIT]
| [http://sourceware.org/libffi http://sourceware.org/libffi]
| --
|-
| LibPNG
| 1.5.4
| [http://www.opensource.org/licenses/Zlib ZLib/PNG]
| [http://www.libpng.org/pub/png/libpng.html http://www.libpng.org/pub/png/libpng.html]
| --
|-
| XPM-NoX
| 4.2.0
| [http://www.opensource.org/licenses/MIT MIT]
| unknown
| [http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32 http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32]
|-
| Tcl
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| Tk
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| BLT
| 2.4z
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://blt.sourceforge.net http://blt.sourceforge.net]
| --
|-
| HDF5
| 1.8.7
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://www.hdfgroup.org/HDF5 http://www.hdfgroup.org/HDF5]
| --
|-
| Swarm
| 2.4.1
| [http://www.opensource.org/licenses/GPL-3.0 GPL]
| [http://www.swarm.org http://www.swarm.org]
| [http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
|}
d2d4d4b9fdbbe7122f03cf11717dcc9990fb419b
2172
2171
2015-12-03T01:54:22Z
SwarmWikiSysop
5
wikitext
text/x-wiki
= Overview =
This documentation provides information on how to use Swarm on Windows with [http://www.mingw.org MinGW] compilers. The following topics will be covered:
* How to run a Swam model compiled with MinGW on Windows: Once you produce a Swarm model using MinGW (or someone gives one to you), how do you run it on other machines without installing Swarm there?
* How to use MinGW to compile your own Swarm models, either during model development or so you can distribute working models to others. This requires installing MinGW and our binary Swarm libraries.
* How to package a model compiled with MinGW so it can be installed and run by itself on Windows machines.
* How to use MinGW to compile the Swarm libraries, in case you want to build your own Swarm binaries.
Each topic is more difficult than the one before it. However the topics are independent in that it is not necessary to know how to compile the Swarm library in order to run a pre-compiled Swarm model or compile your own model against a pre-compiled version of Swarm.
= Using Swarm Models Compiled with MinGW =
A model that has been compiled using MinGW can be installed and run from a Windows computer without installing MinGW or Swarm. An example code is this build of Heatbugs:
[http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe]
However, running a Swarm model requires some support programs and libraries. These are available as
<tt>swarm-2.4.1-win32.zip</tt>, available here:
[http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip]
Unzipping that file will create a folder called <tt>swarm</tt> which should be moved somewhere that is easy to remember. The rest of this tutorial will assume this Swarm folder has been placed at <tt>C:\swarm</tt>.
Before a Swarm model can be run, the <tt>swarm\bin</tt> folder must be added to the Windows <tt>PATH</tt> so that Heatbugs can find necessary libraries when it runs. The <tt>swarm\bin</tt> folder can be ''temporarily'' added to the path by executing the following in the Windows command line (the command line is accessed using the program <tt>cmd.exe</tt>):
<pre>path=%PATH%;C:\swarm\bin</pre>
However, it is possible to have conflicts if other versions of libraries used by Swarm, such as HDF5, are already installed and in your path. And some Swarm programs require that the environment variable SWARMHOME be defined, which will typically not be true. These problems can be avoided by using the following statements instead of the above path command:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%</pre>
You can alternatively add the Swarm folder to your <tt>PATH</tt> permanently by editing the Windows PATH environment variable. A tool like [[#RapidEE|RapidEE]] makes doing so easy, or you can use use Windows control panel > System > Advanced > Environment Variables to add <tt>swarm\bin</tt> to the PATH system variable.
Once the path has been set to include the <tt>swarm\bin</tt> folder, Swarm models can be started through the Windows command line, or by double-clicking on them from the Windows Explorer.
The Heatbugs model can now be run by changing the directory of the command line to the folder holding <tt>heatbugs.exe</tt> and then executing the program. For example, if <tt>heatbugs.exe</tt> is located in <tt>C:\Users\example_user\Downloads</tt>, then the model may be run as follows:
<pre>cd C:\Users\example_user\Downloads
heatbugs.exe</pre>
(or you can just double-click on <tt>heatbugs.exe</tt> from Windows Explorer, which temporarily opens a Windows command terminal while the model runs.)
[[Image:Running_Heatbugs.png|frame|none|alt=Running the Heatbugs model]]
You can also create a simple Windows batch file that sets SWARMHOME and the path and then executes the model. Create a file called, for example <tt>heatbugs.bat</tt> in the same directory where <tt>heatbugs.exe</tt> is, containing these lines:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%
heatbugs.exe</pre>
Then, just double-clicking on <tt>heatbugs.bat</tt> will start the model.
If you try this and get an error that some .dll file is not found, then the problem is likely that the path is not set correctly to include the swarm\bin folder. If instead the program crashes without an error statement, then the problem is more likely that SWARMHOME needs to be set.
= Installing Swarm and MinGW to compile models =
To compile Swarm models from source using MinGW, the following simple steps need to be taken to set up the build environment:
* [[#MinGW|Install MinGW using instructions here]]. Currently only 32-bit MinGW can be used with Swarm. Install all components of MinGW.
* Download compiled Swarm binaries, archived as [http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip swarm-2.4.1-win32.zip]. Unzip the archive and place the extracted folder at <tt>C:\swarm</tt>.
'''NOTE:'''
The archived Swarm binaries '''MUST''' be placed at <tt>C:\swarm</tt> to successfully compile Swarm models. This is because some paths had to be hard-coded by <tt>libtool</tt> during the creation of the binaries.
The final step before you can compile a Swarm model is to set the <tt>SWARMHOME</tt> environment variable so that the "make" program knows where to find the Swarm libraries when compiling your code. There are several ways to do this.
*You can temporarily set SWARMHOME by entering this command in the MinGW shell: <pre>export SWARMHOME=/c/swarm</pre>
*You can edit your Makefile so it starts with: <pre>SWARMHOME=/c/swarm</pre>
*Set SWARMHOME permanently as a Windows environment variable, either by using [[#RapidEE|RapidEE]] or Windows control panel > System > Advanced > Environment Variables to add a new (User or System) variable called SWARMHOME with the value <tt>/c/swarm</tt>.
After MinGW has been installed and the Swarm binaries have been downloaded, Swarm models may be compiled using the MinGW shell. Start up the program MinGW Shell, cd to the directory containing your code and Makefile, and enter the command "Make".
An archive of official Swarm example programs can be downloaded from:
[http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
We will use the "Heatbugs" model as an example of how to compile a Swarm application:
<pre>tar xzf /path/to/downloaded/swarmapps-2.3.0.tar.gz
cd swarmapps-2.3.0/objc/heatbugs
make</pre>
'''VERY IMPORTANT NOTE: MinGW produces two executables called <tt>heatbugs.exe</tt>---one in the <tt>heatbugs</tt> folder and another in the <tt>heatbugs/.libs</tt> folder. You should ignore the executable in the top-level folder, <tt>heatbugs/heatbugs.exe</tt>, as it is merely a compiled wrapper script that executes <tt>heatbugs/.libs/heatbugs.exe</tt>. When distributing compiled models, only use binaries from the <tt>.libs</tt> folder.'''
The resulting executable, <tt>.libs/heatbugs.exe</tt> may be executing by following the steps described above at ''Using Swarm Models Compiled with MinGW''. These steps must include setting the Windows Path to include <tt>C:\swarm\bin</tt>.
= Distributing a Swarm Model for Windows Users =
A major benefit of the MinGW version of Swarm is that models can be distributed for people to use without installing Swarm. A simple way to do this, after the model has been compiled and tested using methods in the previous section, is to create a ZIP archive that contains all the files to run the model.
* Create a directory tree that includes the Swarm binary files. For example, create C:\MySwarmModel and add the Swarm binaries (as described [[Swarm_and_MinGW#Using_Swarm_Models_Compiled_with_MinGW|above]]) to it as a subdirectory tree.
* Create another subdirectory that includes just the compiled model.
* Create a third subdirectory that includes any input files that the model needs and a batch file that sets the path and executes the model.
* Zip the whole tree up for distribution.
The directory tree in the zip file looks like this:
<pre>
C:\MySwarmModel\swarm
\bin
\etc
\include
\lib
\man
\share
\executable\MySwarmModel.exe
\Runfiles\MySwarmModel.bat (and any input files)
</pre>
where the file <tt>MySwarmModel.bat</tt> contains:
<pre>
set SWARMHOME=C:\MySwarmModel\swarm
path=%SWARMHOME%\bin;%PATH%
C:\MySwarmModel\executable\MySwarmModel.exe
</pre>
Then users can run the model just by double-clicking on <tt>MySwarmModel.bat</tt>.
= Building Swarm Using MinGW =
This tutorial provides directions and code for compiling your own Swarm libraries for Windows. It is a bit advanced---some familiarity with compiling software from source in a Linux environment and knowledge of the UNIX command line is assumed.
== Install Required Tools ==
The first step is to download and install tools required for compiling Swarm. These links provide directions:
* [[#MinGW|MinGW]]
* [[#Emacs|Emacs]]
* [[#GPerf|GPerf]]
== Build Support Libraries ==
The next steps are to build and install the libraries that Swarm depends on. A ZIP archive containing all the source code required can be found at:
[http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip]
This archive contains two subdirectories:
* sources: This folder contains the source code for each component.
* patches: This folder contains patchfiles that modfy source code so that MinGW can compile it.
After downloading and extracting the source code archive, open up a MinGW shell and run the following commands:
<pre>cd /path/to/where/swarm/source/was/extracted
mkdir build</pre>
The following steps will all assume your MinGW shell is operating out of the <tt>build</tt> directory. All compiled software will be installed to <tt>/c/swarm</tt> (The Windows Explorer will see the folder appear at <tt>C:\swarm</tt>).
=== ZLib ===
ZLib will be the first library to be built as it is a common dependency for many of the other software components. From the <tt>build</tt> directory, execute the following to build Zlib:
<pre>tar xzf ../sources/zlib-1.2.5.tar.gz
cd zlib-1.2.5
make -f win32/Makefile.gcc</pre>
And then the following commands to install ZLib to <tt>/c/swarm</tt>:
<pre>mkdir -p /c/swarm/bin
mkdir -p /c/swarm/include
mkdir -p /c/swarm/lib
cp zlib1.dll /c/swarm/bin/
cp zconf.h zlib.h /c/swarm/include/
mv libzdll.a libz.dll.a
cp *.a /c/swarm/lib</pre>
=== LibPNG ===
LibPNG will be built next as its only dependency is ZLib. From the <tt>build</tt> directory, execute the following steps to build and install LibPNG:
<pre>tar xjf ../sources/libpng-1.5.4.tar.bz2
cd libpng-1.5.4
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm --with-zlib-prefix=/c/swarm
make
make install</pre>
=== XPM ===
Starting from the <tt>build</tt> directory, the XPM library can be built and installed as follows:
<pre>tar xjf ../sources/xpm-nox-4.2.0.tar.bz2
cd xpm-nox-4.2.0
patch -p1 &lt; ../../patches/xpm-nox-4.2.0-mingw-tcl.patch
make CC=gcc
make install prefix=/c/swarm</pre>
'''Summary of patchfile changes:'''
The patchfile is inherited from the SUSE builds of XPM for MinGW and adds Makefiles and other critical components.
One major modification has been made to the SUSE patchfile---<tt>tcl.h</tt> is included in <tt>xpm.h</tt>. This is required in order to use XPM while Tk is installed. Conversely, this means that this build of XPM cannot be used without having Tk installed.
=== LibFFI ===
Starting from the <tt>build</tt> directory, LibFFI can be built and installed as follows:
<pre>tar xzf ../sources/libffi-3.0.9.tar.gz
cd libffi-3.0.9
./configure --prefix=/c/swarm
make
make install</pre>
The LibFFI headers get installed in a weird place.
<pre>mv /c/swarm/lib/libffi-3.0.9/include/*.h /c/swarm/include
rm -rf /c/swarm/lib/libffi-3.0.9</pre>
=== Tcl ===
Starting from the <tt>build</tt> directory, Tcl can be built and installed as follows:
<pre>tar xzf ../sources/tcl8.4.19-src.tar.gz
cd tcl8.4.19
patch -p1 &lt; ../../patches/tcl-8.4.19-fix-lvalues.patch
cd win
./configure --prefix=/c/swarm
make
make install</pre>
'''Summary of patchfile changes:'''
At two places in the TCL source code, an assignment is made while simultaneously performing a typecast. The typecast and the assignment had to be split into separate operations in order to be acceptable to the MinGW compilers.
=== Tk ===
Starting from the <tt>build</tt> directory, Tk can be built and installed as follows:
<pre>tar xzf ../sources/tk8.4.19-src.tar.gz
cd tk8.4.19/win
./configure --prefix=/c/swarm
make
make install</pre>
=== BLT ===
Starting from the <tt>build</tt> directory, BLT can be built and installed as follows:
<pre>tar xzf ../sources/BLT2.4z.tar.gz
cd blt2.4z
./configure --prefix=/c/swarm --without-x
make
make install</pre>
=== HDF5 (Optional) ===
Getting HDF5 to work with MinGW is a little tricky. It is an optional dependency, so if support for reading and writing <tt>.hdf</tt> files is not needed this section can be skipped.
As of version 1.8.7, HDF5 currently does not compile under MinGW. So, we must wrap pre-compiled binaries for use with MinGW. In order to wrap the binaries, we will need an additional tool called <tt>pexports</tt>. This can be installed using <tt>mingw-get</tt>:
<pre>mingw-get install mingw-utils</pre>
Download 32-bit Windows binaries from the HDF website compiled for use with the Visual Studio compilers (these files have "VS" listed under the ''Compilers'' section). After extracting the archive, the HDF5 libraries can be wrapped for use with MinGW by executing the following commands:
<pre>cd path/to/where/HDF5/was/extracted
for dll in `ls dll/*dll`; do
def_file=`basename $dll .dll`.def
lib_file=lib`basename $dll dll.dll`.a
pexports $dll &gt; $def_file
dlltool -d $def_file -l lib/$lib_file
done</pre>
Next, move the libraries and header files needed to use HDF5 from C into <tt>C:\swarm</tt>:
<pre>cp dll/hdf5dll.dll dll/szip.dll /c/swarm/bin
cp include/* /c/swarm/include
cp lib/libhdf5.a /c/swarm/lib</pre>
Finally, a patch must be applied to the HDF header file <tt>H5public.h</tt> so that it doesn't define <tt>ssize_t</tt>---a constant already defined by MinGW. The required patch is contained in the Swarm MinGW source archive:
<pre>cd /path/to/where/swarm/source/was/extracted
patch -p1 -d /c/swarm &lt; patches/hdf5-1.8.7-mingw.patch</pre>
== Build Swarm ==
Finally, the Swarm libraries themselves can be built. From the <tt>build</tt> directory, execute the following
<pre>tar xzf ../sources/swarm-2.4.1.tar.gz
cd swarm-2.4.1
patch -p1 ../../patches/swarm-2.4.1-mingw.patch
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm \
--with-zlibdir=/c/swarm \
--with-pngdir=/c/swarm \
--with-xpmdir=/c/swarm \
--with-ffidir=/c/swarm \
--with-tcl=/c/swarm/lib \
--with-tk=/c/swarm/lib \
--with-bltdir=/c/swarm
cd avcall
gcc -S avcall-i386.c
cd ..
make
make install</pre>
If you wrapped HDF5 up for use with MinGW, add <tt>--with-hdf5dir=/c/swarm</tt> to the list of arguments passed to <tt>configure</tt>.
'''Summary of patchfile changes:'''
<tt>swarm-2.4.1-mingw.patch</tt> modifies the Swarm source code in the following ways:
* <tt>gettimeofday</tt> is no longer defined in the Swarm sources as MinGW includes this function in its standard library.
* Swarm GUI functions are updated to be compatible with LibPNG 1.5.
* The Swarm <tt>configure</tt> script defines <tt>DATADIR</tt> as a preprocessor macro---this conflicts with variables in the GCC Objective-C library. <tt>DATDIR</tt> is <tt>undef</tt>ed in critical parts of the source code.
* The <tt>sleep</tt> function is aliased to <tt>usleep</tt>---which is the name of the MinGW implementation.
* The way in which Makefiles invoke <tt>gperf</tt> is amended so that it actually produces output.
* NULL checks are added to `zstrdup` in src/defobj/internal.m. Some functions in the Swarm library may attempt to call `zstrdup` on a NULL pointer. (This happens if the SWARMHOME environment variable is not set.) Failing to check for this condition can lead to segfaults. `zstrdup` now returns NULL if passed a NULL string or if `alloc` fails to allocate memory for a duplicate.
Full details are contained in the patchfile.
= Tools =
== MinGW ==
'''Homepage:''' http://www.mingw.org
'''Download Area:''' http://sourceforge.net/projects/mingw/files
'''Version Used:''' 20110530
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
[http://www.mingw.org MinGW] is a set of software that aims to provide an environment where software developed on UNIX-like systems can be easily compiled for Windows. Since Swarm is primarily developed on Linux (a UNIX clone), MinGW can ease the task of creating Swarm models that run on Windows.
MinGW is similar to the [http://www.cygwin.org Cygwin] project. The major difference is that MinGW produces executables that depend only on native Windows libraries while Cygwin executables require special compatibility libraries that are part of the Cygwin distribution.
=== Installing MinGW ===
MinGW can be installed by downloading the "Automated MinGW Installer", which usually has a name like <tt>mingw-get-inst-&lt;date&gt;.exe</tt> where <tt>&lt;date&gt;</tt> is the datestamp for when the installer was packaged. Running this executable will start the installation process. The installer lets you select which optional components to install; make sure all boxes are checked so you '''install all components'''.
[[Image:MinGW_Setup.png|frame|none|alt=Install all available MinGW components]]
The installer downloads all components from the internet. This will take a while, so have a cup of coffee or walk the dog.
See the following section about also installing an optional, more-functional shell window for MinGW.
=== Using MinGW ===
The MinGW compilers are accessible through the "MinGW Shell" which should be located under the MinGW folder in the Start Menu:
[[Image:MinGW_Shell.png|frame|none|alt=Location of MinGW Shell]]
or by running <tt>C:\MinGW\msys\1.0\msys.bat</tt> (if MinGW was installed to its default location).
By default the MinGW shell executes inside of a Windows <tt>cmd.exe</tt> terminal. There are a couple major drawbacks to this:
* You cannot resize the window to full-screen.
* The shell provides limited history scrollback.
MinGW provides a couple of alternative terminals for the MinGW shell which do not have these drawbacks; one of which is called MinTTY. To install MinTTY execute the following in a MinGW shell:
<pre>mingw-get install mintty</pre>
Then the <tt>mintty</tt> command can be used to launch a MinTTY terminal. The MinGW Shell can also be set to launch MinTTY by default by editing the file <tt>C:\MinGW\msys\1.0\msys.bat</tt> and changing the following line (approximately line 58):
<pre>if "x%MSYSCON%" == "xunknown" set MSYSCON=sh.exe</pre>
to:
<pre>if "x%MSYSCON%" == "xunknown" set MSYSCON=mintty.exe</pre>
=== A Note About Paths ===
The MinGW Shell emulates a UNIX <tt>bash</tt> shell and thus uses UNIX-style paths, <tt>/path/to/file</tt>, instead of Windows-style paths, <tt>C:\path\to\file</tt>. One peculiarity of this process is that the shell must deal with the fact that Windows filesystems have multiple roots (<tt>C:</tt>, <tt>D:</tt>, etc.) while a UNIX filesystem only has one root called <tt>/</tt>. The way this is reconciled by the <tt>bash</tt> shell provided with MinGW is that <tt>/c</tt> refers to the root of the <tt>C:</tt> drive, <tt>/d</tt> refers to the root of the <tt>D:</tt> drive and so on and so forth.
The root of the filesystem itself, <tt>/</tt>, also has some caveats. <tt>/</tt> refers to the <tt>mysy</tt> folder, <tt>C:/MinGW/mysys/1.0</tt> in a default installation. <tt>/usr</tt> also refers to the same location. Thus, <tt>/usr/local</tt> and <tt>/local</tt> both refer to <tt>C:/MinGW/mysys/1.0/local</tt>.
=== A Note About MinGW-64 ===
Currently Swarm has been developed and tested against the 32-bit version of MinGW. Hence Swarm models produced this way should run in any version of Windows.
The [MinGW-w64][mingw_65] project produces 64-bit MinGW compilers that can produce 64-bit executables that will only run on 64-bit versions of Windows. These executables benefit from:
* Access to more memory. A 32-bit executable will only be able to allocate ~3 GB of RAM---even if the system has more RAM available.
* Possibly quicker execution speeds due to matching the native architecture of the operating system---however this depends on the types of tasks that the program executes. It has been reported that 64 bit Swarm executables run quicker than 32 bit Swarm executables on Linux.
Currently, no attempt has been made to compile Swarm 2.4.1 with the 64 bit MinGW compilers. If a successful attempt is made, please report it on the [http://www.swarm.org/mailman/listinfo/support Swarm mailing list].
== Emacs ==
'''Homepage:''' http://www.gnu.org/software/emacs
'''Version Used:''' 23.3
'''Download Area:''' http://ftp.gnu.org/gnu/emacs/windows
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GNU Emacs is a text editor that is used by many programmers to edit code. However, Emacs can also be scripted to perform a variety of complicated transformations on text files. The scripts that build the Swarm libraries use Emacs to automate the process of generating some source files. Thus Emacs has to be installed in order to build Swarm from source.
=== Installing Emacs ===
Install Emacs by downloading one of the <tt>emacs-&lt;version
number&gt;-bin-i386.zip</tt> files from the download area. Don't use any of the
files containing <tt>barebin</tt>. After extracting the ZIP archive there will
be an Emacs folder containing a subfolder called <tt>bin</tt>. Add this folder
to your Windows <tt>PATH</tt>. [[#RapidEE|RapidEE]] can help edit the
<tt>PATH</tt> variable.
== GPerf ==
'''Homepage:''' http://www.gnu.org/software/gperf/
'''Download Area:''' http://sourceforge.net/projects/gnuwin32/files/gperf
'''Version Used:''' 3.0.1
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GPerf is a program that produces C code containing hash functions. The scripts
that build the Swarm libraries use GPerf to generate some source code files.
Download <tt>gperf.exe</tt> from the GnuWin32 site on Sourceforge and place it
somewhere on your Windows <tt>PATH</tt>. Again, [[#RapidEE|RapidEE]] can help set the <tt>PATH</tt> variable.
== RapidEE ==
'''Homepage:''' http://www.rapidee.com
'''Version Used:''' 5.0
'''License:''' [http://www.rapidee.com/en/license Freeware]
The Rapid Environment Editor (RapidEE) is a spiffy tool that makes it easy to inspect and alter the value of Windows environment variables, such as the <tt>PATH</tt>. RapidEE may be used to edit "System Variables" which will affect all user accounts or "User Variables" which will affect just the current account. Administrative privileges may be required to edit the System Variables.
[[Image:RapidEE_1.png|frame|none|alt=The different variables RapidEE can edit]]
Right-clicking on the <tt>Path</tt> variable in the System Variables or User Variables will bring up a menu that presents the option to "Add value":
[[Image:RapidEE_2.png|frame|none|alt=Adding a new value to the PATH]]
Once the new entry has been added, RapidEE must be told to save the changes. Command line shells, such as <tt>cmd.exe</tt>, must be restarted in order for them to notice the changes.
[[Image:RapidEE_3.png|frame|none|alt=Adding and saving a value]]
== Depends ==
'''Homepage:''' http://www.dependencywalker.com/
'''Version Used:''' 2.2
'''License:''' Freeware
Depends is a usefull utility that scans Windows executables and reports information concerning the Dynamic-link Libraries (DLLs) that those executables require in order to run.
= Software Used to Compile Swarm 2.4.1 =
{|
! Name
! Verson Used
! License
! Homepage
! Download Area
|-
| ZLib
| 1.2.5
| [http://www.opensource.org/licenses/Zlib ZLib/PNG License]
| [http://www.zlib.net http://www.zlib.net]
| --
|-
| LibFFI
| 3.0.9
| [http://www.opensource.org/licenses/MIT MIT]
| [http://sourceware.org/libffi http://sourceware.org/libffi]
| --
|-
| LibPNG
| 1.5.4
| [http://www.opensource.org/licenses/Zlib ZLib/PNG]
| [http://www.libpng.org/pub/png/libpng.html http://www.libpng.org/pub/png/libpng.html]
| --
|-
| XPM-NoX
| 4.2.0
| [http://www.opensource.org/licenses/MIT MIT]
| unknown
| [http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32 http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32]
|-
| Tcl
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| Tk
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| BLT
| 2.4z
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://blt.sourceforge.net http://blt.sourceforge.net]
| --
|-
| HDF5
| 1.8.7
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://www.hdfgroup.org/HDF5 http://www.hdfgroup.org/HDF5]
| --
|-
| Swarm
| 2.4.1
| [http://www.opensource.org/licenses/GPL-3.0 GPL]
| [http://www.swarm.org http://www.swarm.org]
| [http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
|}
1bef9dcc52ab2639c8a5cc1578f6d6b36b43aea5
2171
2164
2015-12-03T01:50:57Z
SwarmWikiSysop
5
/* RapidEE */
wikitext
text/x-wiki
= Overview =
This documentation provides information on how to use Swarm on Windows with [http://www.mingw.org MinGW] compilers. The following topics will be covered:
* How to run a Swam model compiled with MinGW on Windows: Once you produce a Swarm model using MinGW (or someone gives one to you), how do you run it on other machines without installing Swarm there?
* How to use MinGW to compile your own Swarm models, either during model development or so you can distribute working models to others. This requires installing MinGW and our binary Swarm libraries.
* How to package a model compiled with MinGW so it can be installed and run by itself on Windows machines.
* How to use MinGW to compile the Swarm libraries, in case you want to build your own Swarm binaries.
Each topic is more difficult than the one before it. However the topics are independent in that it is not necessary to know how to compile the Swarm library in order to run a pre-compiled Swarm model or compile your own model against a pre-compiled version of Swarm.
= Using Swarm Models Compiled with MinGW =
A model that has been compiled using MinGW can be installed and run from a Windows computer without installing MinGW or Swarm. An example code is this build of Heatbugs:
[http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe]
However, running a Swarm model requires some support programs and libraries. These are available as
<tt>swarm-2.4.1-win32.zip</tt>, available here:
[http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip]
Unzipping that file will create a folder called <tt>swarm</tt> which should be moved somewhere that is easy to remember. The rest of this tutorial will assume this Swarm folder has been placed at <tt>C:\swarm</tt>.
Before a Swarm model can be run, the <tt>swarm\bin</tt> folder must be added to the Windows <tt>PATH</tt> so that Heatbugs can find necessary libraries when it runs. The <tt>swarm\bin</tt> folder can be ''temporarily'' added to the path by executing the following in the Windows command line (the command line is accessed using the program <tt>cmd.exe</tt>):
<pre>path=%PATH%;C:\swarm\bin</pre>
However, it is possible to have conflicts if other versions of libraries used by Swarm, such as HDF5, are already installed and in your path. And some Swarm programs require that the environment variable SWARMHOME be defined, which will typically not be true. These problems can be avoided by using the following statements instead of the above path command:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%</pre>
You can alternatively add the Swarm folder to your <tt>PATH</tt> permanently by editing the Windows PATH environment variable. A tool like [[#RapidEE|RapidEE]] makes doing so easy, or you can use use Windows control panel > System > Advanced > Environment Variables to add <tt>swarm\bin</tt> to the PATH system variable.
Once the path has been set to include the <tt>swarm\bin</tt> folder, Swarm models can be started through the Windows command line, or by double-clicking on them from the Windows Explorer.
The Heatbugs model can now be run by changing the directory of the command line to the folder holding <tt>heatbugs.exe</tt> and then executing the program. For example, if <tt>heatbugs.exe</tt> is located in <tt>C:\Users\example_user\Downloads</tt>, then the model may be run as follows:
<pre>cd C:\Users\example_user\Downloads
heatbugs.exe</pre>
(or you can just double-click on <tt>heatbugs.exe</tt> from Windows Explorer, which temporarily opens a Windows command terminal while the model runs.)
[[Image:Running_Heatbugs.png|frame|none|alt=Running the Heatbugs model]]
You can also create a simple Windows batch file that sets SWARMHOME and the path and then executes the model. Create a file called, for example <tt>heatbugs.bat</tt> in the same directory where <tt>heatbugs.exe</tt> is, containing these lines:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%
heatbugs.exe</pre>
Then, just double-clicking on <tt>heatbugs.bat</tt> will start the model.
If you try this and get an error that some .dll file is not found, then the problem is likely that the path is not set correctly to include the swarm\bin folder. If instead the program crashes without an error statement, then the problem is more likely that SWARMHOME needs to be set.
= Installing Swarm and MinGW to compile models =
To compile Swarm models from source using MinGW, the following simple steps need to be taken to set up the build environment:
* [[#MinGW|Install MinGW using instructions here]]. Currently only 32-bit MinGW can be used with Swarm. Install all components of MinGW.
* Download compiled Swarm binaries, archived as [http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip swarm-2.4.1-win32.zip]. Unzip the archive and place the extracted folder at <tt>C:\swarm</tt>.
'''NOTE:'''
The archived Swarm binaries '''MUST''' be placed at <tt>C:\swarm</tt> to successfully compile Swarm models. This is because some paths had to be hard-coded by <tt>libtool</tt> during the creation of the binaries.
The final step before you can compile a Swarm model is to set the <tt>SWARMHOME</tt> environment variable so that the "make" program knows where to find the Swarm libraries when compiling your code. There are several ways to do this.
*You can temporarily set SWARMHOME by entering this command in the MinGW shell: <pre>export SWARMHOME=/c/swarm</pre>
*You can edit your Makefile so it starts with: <pre>SWARMHOME=/c/swarm</pre>
*Set SWARMHOME permanently as a Windows environment variable, either by using [[#RapidEE|RapidEE]] or Windows control panel > System > Advanced > Environment Variables to add a new (User or System) variable called SWARMHOME with the value <tt>/c/swarm</tt>.
After MinGW has been installed and the Swarm binaries have been downloaded, Swarm models may be compiled using the MinGW shell. Start up the program MinGW Shell, cd to the directory containing your code and Makefile, and enter the command "Make".
An archive of official Swarm example programs can be downloaded from:
[http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
We will use the "Heatbugs" model as an example of how to compile a Swarm application:
<pre>tar xzf /path/to/downloaded/swarmapps-2.3.0.tar.gz
cd swarmapps-2.3.0/objc/heatbugs
make</pre>
'''VERY IMPORTANT NOTE: MinGW produces two executables called <tt>heatbugs.exe</tt>---one in the <tt>heatbugs</tt> folder and another in the <tt>heatbugs/.libs</tt> folder. You should ignore the executable in the top-level folder, <tt>heatbugs/heatbugs.exe</tt>, as it is merely a compiled wrapper script that executes <tt>heatbugs/.libs/heatbugs.exe</tt>. When distributing compiled models, only use binaries from the <tt>.libs</tt> folder.'''
The resulting executable, <tt>.libs/heatbugs.exe</tt> may be executing by following the steps described above at ''Using Swarm Models Compiled with MinGW''. These steps must include setting the Windows Path to include <tt>C:\swarm\bin</tt>.
= Distributing a Swarm Model for Windows Users =
A major benefit of the MinGW version of Swarm is that models can be distributed for people to use without installing Swarm. A simple way to do this, after the model has been compiled and tested using methods in the previous section, is to create a ZIP archive that contains all the files to run the model.
* Create a directory tree that includes the Swarm binary files. For example, create C:\MySwarmModel and add the Swarm binaries (as described [[Swarm_and_MinGW#Using_Swarm_Models_Compiled_with_MinGW|above]]) to it as a subdirectory tree.
* Create another subdirectory that includes just the compiled model.
* Create a third subdirectory that includes any input files that the model needs and a batch file that sets the path and executes the model.
* Zip the whole tree up for distribution.
The directory tree in the zip file looks like this:
<pre>
C:\MySwarmModel\swarm
\bin
\etc
\include
\lib
\man
\share
\executable\MySwarmModel.exe
\Runfiles\MySwarmModel.bat (and any input files)
</pre>
where the file <tt>MySwarmModel.bat</tt> contains:
<pre>
set SWARMHOME=C:\MySwarmModel\swarm
path=%SWARMHOME%\bin;%PATH%
C:\MySwarmModel\executable\MySwarmModel.exe
</pre>
Then users can run the model just by double-clicking on <tt>MySwarmModel.bat</tt>.
= Building Swarm Using MinGW =
This tutorial provides directions and code for compiling your own Swarm libraries for Windows. It is a bit advanced---some familiarity with compiling software from source in a Linux environment and knowledge of the UNIX command line is assumed.
== Install Required Tools ==
The first step is to download and install tools required for compiling Swarm. These links provide directions:
* [[#MinGW|MinGW]]
* [[#Emacs|Emacs]]
* [[#GPerf|GPerf]]
== Build Support Libraries ==
The next steps are to build and install the libraries that Swarm depends on. A ZIP archive containing all the source code required can be found at:
[http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip]
This archive contains two subdirectories:
* sources: This folder contains the source code for each component.
* patches: This folder contains patchfiles that modfy source code so that MinGW can compile it.
After downloading and extracting the source code archive, open up a MinGW shell and run the following commands:
<pre>cd /path/to/where/swarm/source/was/extracted
mkdir build</pre>
The following steps will all assume your MinGW shell is operating out of the <tt>build</tt> directory. All compiled software will be installed to <tt>/c/swarm</tt> (The Windows Explorer will see the folder appear at <tt>C:\swarm</tt>).
=== ZLib ===
ZLib will be the first library to be built as it is a common dependency for many of the other software components. From the <tt>build</tt> directory, execute the following to build Zlib:
<pre>tar xzf ../sources/zlib-1.2.5.tar.gz
cd zlib-1.2.5
make -f win32/Makefile.gcc</pre>
And then the following commands to install ZLib to <tt>/c/swarm</tt>:
<pre>mkdir -p /c/swarm/bin
mkdir -p /c/swarm/include
mkdir -p /c/swarm/lib
cp zlib1.dll /c/swarm/bin/
cp zconf.h zlib.h /c/swarm/include/
mv libzdll.a libz.dll.a
cp *.a /c/swarm/lib</pre>
=== LibPNG ===
LibPNG will be built next as its only dependency is ZLib. From the <tt>build</tt> directory, execute the following steps to build and install LibPNG:
<pre>tar xjf ../sources/libpng-1.5.4.tar.bz2
cd libpng-1.5.4
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm --with-zlib-prefix=/c/swarm
make
make install</pre>
=== XPM ===
Starting from the <tt>build</tt> directory, the XPM library can be built and installed as follows:
<pre>tar xjf ../sources/xpm-nox-4.2.0.tar.bz2
cd xpm-nox-4.2.0
patch -p1 &lt; ../../patches/xpm-nox-4.2.0-mingw-tcl.patch
make CC=gcc
make install prefix=/c/swarm</pre>
'''Summary of patchfile changes:'''
The patchfile is inherited from the SUSE builds of XPM for MinGW and adds Makefiles and other critical components.
One major modification has been made to the SUSE patchfile---<tt>tcl.h</tt> is included in <tt>xpm.h</tt>. This is required in order to use XPM while Tk is installed. Conversely, this means that this build of XPM cannot be used without having Tk installed.
=== LibFFI ===
Starting from the <tt>build</tt> directory, LibFFI can be built and installed as follows:
<pre>tar xzf ../sources/libffi-3.0.9.tar.gz
cd libffi-3.0.9
./configure --prefix=/c/swarm
make
make install</pre>
The LibFFI headers get installed in a weird place.
<pre>mv /c/swarm/lib/libffi-3.0.9/include/*.h /c/swarm/include
rm -rf /c/swarm/lib/libffi-3.0.9</pre>
=== Tcl ===
Starting from the <tt>build</tt> directory, Tcl can be built and installed as follows:
<pre>tar xzf ../sources/tcl8.4.19-src.tar.gz
cd tcl8.4.19
patch -p1 &lt; ../../patches/tcl-8.4.19-fix-lvalues.patch
cd win
./configure --prefix=/c/swarm
make
make install</pre>
'''Summary of patchfile changes:'''
At two places in the TCL source code, an assignment is made while simultaneously performing a typecast. The typecast and the assignment had to be split into separate operations in order to be acceptable to the MinGW compilers.
=== Tk ===
Starting from the <tt>build</tt> directory, Tk can be built and installed as follows:
<pre>tar xzf ../sources/tk8.4.19-src.tar.gz
cd tk8.4.19/win
./configure --prefix=/c/swarm
make
make install</pre>
=== BLT ===
Starting from the <tt>build</tt> directory, BLT can be built and installed as follows:
<pre>tar xzf ../sources/BLT2.4z.tar.gz
cd blt2.4z
./configure --prefix=/c/swarm --without-x
make
make install</pre>
=== HDF5 (Optional) ===
Getting HDF5 to work with MinGW is a little tricky. It is an optional dependency, so if support for reading and writing <tt>.hdf</tt> files is not needed this section can be skipped.
As of version 1.8.7, HDF5 currently does not compile under MinGW. So, we must wrap pre-compiled binaries for use with MinGW. In order to wrap the binaries, we will need an additional tool called <tt>pexports</tt>. This can be installed using <tt>mingw-get</tt>:
<pre>mingw-get install mingw-utils</pre>
Download 32-bit Windows binaries from the HDF website compiled for use with the Visual Studio compilers (these files have &quot;VS&quot; listed under the ''Compilers'' section). After extracting the archive, the HDF5 libraries can be wrapped for use with MinGW by executing the following commands:
<pre>cd path/to/where/HDF5/was/extracted
for dll in `ls dll/*dll`; do
def_file=`basename $dll .dll`.def
lib_file=lib`basename $dll dll.dll`.a
pexports $dll &gt; $def_file
dlltool -d $def_file -l lib/$lib_file
done</pre>
Next, move the libraries and header files needed to use HDF5 from C into <tt>C:\swarm</tt>:
<pre>cp dll/hdf5dll.dll dll/szip.dll /c/swarm/bin
cp include/* /c/swarm/include
cp lib/libhdf5.a /c/swarm/lib</pre>
Finally, a patch must be applied to the HDF header file <tt>H5public.h</tt> so that it doesn't define <tt>ssize_t</tt>---a constant already defined by MinGW. The required patch is contained in the Swarm MinGW source archive:
<pre>cd /path/to/where/swarm/source/was/extracted
patch -p1 -d /c/swarm &lt; patches/hdf5-1.8.7-mingw.patch</pre>
== Build Swarm ==
Finally, the Swarm libraries themselves can be built. From the <tt>build</tt> directory, execute the following
<pre>tar xzf ../sources/swarm-2.4.1.tar.gz
cd swarm-2.4.1
patch -p1 ../../patches/swarm-2.4.1-mingw.patch
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm \
--with-zlibdir=/c/swarm \
--with-pngdir=/c/swarm \
--with-xpmdir=/c/swarm \
--with-ffidir=/c/swarm \
--with-tcl=/c/swarm/lib \
--with-tk=/c/swarm/lib \
--with-bltdir=/c/swarm
cd avcall
gcc -S avcall-i386.c
cd ..
make
make install</pre>
If you wrapped HDF5 up for use with MinGW, add <tt>--with-hdf5dir=/c/swarm</tt> to the list of arguments passed to <tt>configure</tt>.
'''Summary of patchfile changes:'''
<tt>swarm-2.4.1-mingw.patch</tt> modifies the Swarm source code in the following ways:
* <tt>gettimeofday</tt> is no longer defined in the Swarm sources as MinGW includes this function in its standard library.
* Swarm GUI functions are updated to be compatible with LibPNG 1.5.
* The Swarm <tt>configure</tt> script defines <tt>DATADIR</tt> as a preprocessor macro---this conflicts with variables in the GCC Objective-C library. <tt>DATDIR</tt> is <tt>undef</tt>ed in critical parts of the source code.
* The <tt>sleep</tt> function is aliased to <tt>usleep</tt>---which is the name of the MinGW implementation.
* The way in which Makefiles invoke <tt>gperf</tt> is amended so that it actually produces output.
* NULL checks are added to `zstrdup` in src/defobj/internal.m. Some functions in the Swarm library may attempt to call `zstrdup` on a NULL pointer. (This happens if the SWARMHOME environment variable is not set.) Failing to check for this condition can lead to segfaults. `zstrdup` now returns NULL if passed a NULL string or if `alloc` fails to allocate memory for a duplicate.
Full details are contained in the patchfile.
= Tools =
== MinGW ==
'''Homepage:''' http://www.mingw.org
'''Download Area:''' http://sourceforge.net/projects/mingw/files
'''Version Used:''' 20110530
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
[http://www.mingw.org MinGW] is a set of software that aims to provide an environment where software developed on UNIX-like systems can be easily compiled for Windows. Since Swarm is primarily developed on Linux (a UNIX clone), MinGW can ease the task of creating Swarm models that run on Windows.
MinGW is similar to the [http://www.cygwin.org Cygwin] project. The major difference is that MinGW produces executables that depend only on native Windows libraries while Cygwin executables require special compatibility libraries that are part of the Cygwin distribution.
=== Installing MinGW ===
MinGW can be installed by downloading the "Automated MinGW Installer", which usually has a name like <tt>mingw-get-inst-&lt;date&gt;.exe</tt> where <tt>&lt;date&gt;</tt> is the datestamp for when the installer was packaged. Running this executable will start the installation process. The installer lets you select which optional components to install; make sure all boxes are checked so you '''install all components'''.
[[Image:MinGW_Setup.png|frame|none|alt=Install all available MinGW components]]
The installer downloads all components from the internet. This will take a while, so have a cup of coffee or walk the dog.
See the following section about also installing an optional, more-functional shell window for MinGW.
=== Using MinGW ===
The MinGW compilers are accessible through the &quot;MinGW Shell&quot; which should be located under the MinGW folder in the Start Menu:
[[Image:MinGW_Shell.png|frame|none|alt=Location of MinGW Shell]]
or by running <tt>C:\MinGW\msys\1.0\msys.bat</tt> (if MinGW was installed to its default location).
By default the MinGW shell executes inside of a Windows <tt>cmd.exe</tt> terminal. There are a couple major drawbacks to this:
* You cannot resize the window to full-screen.
* The shell provides limited history scrollback.
MinGW provides a couple of alternative terminals for the MinGW shell which do not have these drawbacks; one of which is called MinTTY. To install MinTTY execute the following in a MinGW shell:
<pre>mingw-get install mintty</pre>
Then the <tt>mintty</tt> command can be used to launch a MinTTY terminal. The MinGW Shell can also be set to launch MinTTY by default by editing the file <tt>C:\MinGW\msys\1.0\msys.bat</tt> and changing the following line (approximately line 58):
<pre>if &quot;x%MSYSCON%&quot; == &quot;xunknown&quot; set MSYSCON=sh.exe</pre>
to:
<pre>if &quot;x%MSYSCON%&quot; == &quot;xunknown&quot; set MSYSCON=mintty.exe</pre>
=== A Note About Paths ===
The MinGW Shell emulates a UNIX <tt>bash</tt> shell and thus uses UNIX-style paths, <tt>/path/to/file</tt>, instead of Windows-style paths, <tt>C:\path\to\file</tt>. One peculiarity of this process is that the shell must deal with the fact that Windows filesystems have multiple roots (<tt>C:</tt>, <tt>D:</tt>, etc.) while a UNIX filesystem only has one root called <tt>/</tt>. The way this is reconciled by the <tt>bash</tt> shell provided with MinGW is that <tt>/c</tt> refers to the root of the <tt>C:</tt> drive, <tt>/d</tt> refers to the root of the <tt>D:</tt> drive and so on and so forth.
The root of the filesystem itself, <tt>/</tt>, also has some caveats. <tt>/</tt> refers to the <tt>mysy</tt> folder, <tt>C:/MinGW/mysys/1.0</tt> in a default installation. <tt>/usr</tt> also refers to the same location. Thus, <tt>/usr/local</tt> and <tt>/local</tt> both refer to <tt>C:/MinGW/mysys/1.0/local</tt>.
=== A Note About MinGW-64 ===
Currently Swarm has been developed and tested against the 32-bit version of MinGW. Hence Swarm models produced this way should run in any version of Windows.
The [MinGW-w64][mingw_65] project produces 64-bit MinGW compilers that can produce 64-bit executables that will only run on 64-bit versions of Windows. These executables benefit from:
* Access to more memory. A 32-bit executable will only be able to allocate ~3 GB of RAM---even if the system has more RAM available.
* Possibly quicker execution speeds due to matching the native architecture of the operating system---however this depends on the types of tasks that the program executes. It has been reported that 64 bit Swarm executables run quicker than 32 bit Swarm executables on Linux.
Currently, no attempt has been made to compile Swarm 2.4.1 with the 64 bit MinGW compilers. If a successful attempt is made, please report it on the [http://www.swarm.org/mailman/listinfo/support Swarm mailing list].
== Emacs ==
'''Homepage:''' http://www.gnu.org/software/emacs
'''Version Used:''' 23.3
'''Download Area:''' http://ftp.gnu.org/gnu/emacs/windows
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GNU Emacs is a text editor that is used by many programmers to edit code. However, Emacs can also be scripted to perform a variety of complicated transformations on text files. The scripts that build the Swarm libraries use Emacs to automate the process of generating some source files. Thus Emacs has to be installed in order to build Swarm from source.
=== Installing Emacs ===
Install Emacs by downloading one of the <tt>emacs-&lt;version
number&gt;-bin-i386.zip</tt> files from the download area. Don't use any of the
files containing <tt>barebin</tt>. After extracting the ZIP archive there will
be an Emacs folder containing a subfolder called <tt>bin</tt>. Add this folder
to your Windows <tt>PATH</tt>. [[#RapidEE|RapidEE]] can help edit the
<tt>PATH</tt> variable.
== GPerf ==
'''Homepage:''' http://www.gnu.org/software/gperf/
'''Download Area:''' http://sourceforge.net/projects/gnuwin32/files/gperf
'''Version Used:''' 3.0.1
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GPerf is a program that produces C code containing hash functions. The scripts
that build the Swarm libraries use GPerf to generate some source code files.
Download <tt>gperf.exe</tt> from the GnuWin32 site on Sourceforge and place it
somewhere on your Windows <tt>PATH</tt>. Again, [[#RapidEE|RapidEE]] can help set the <tt>PATH</tt> variable.
== RapidEE ==
'''Homepage:''' http://www.rapidee.com
'''Version Used:''' 5.0
'''License:''' [http://www.rapidee.com/en/license Freeware]
The Rapid Environment Editor (RapidEE) is a spiffy tool that makes it easy to inspect and alter the value of Windows environment variables, such as the <tt>PATH</tt>. RapidEE may be used to edit "System Variables" which will affect all user accounts or "User Variables" which will affect just the current account. Administrative privileges may be required to edit the System Variables.
[[Image:RapidEE_1.png|frame|none|alt=The different variables RapidEE can edit]]
Right-clicking on the <tt>Path</tt> variable in the System Variables or User Variables will bring up a menu that presents the option to "Add value":
[[Image:RapidEE_2.png|frame|none|alt=Adding a new value to the PATH]]
Once the new entry has been added, RapidEE must be told to save the changes. Command line shells, such as <tt>cmd.exe</tt>, must be restarted in order for them to notice the changes.
[[Image:RapidEE_3.png|frame|none|alt=Adding and saving a value]]
== Depends ==
'''Homepage:''' http://www.dependencywalker.com/
'''Version Used:''' 2.2
'''License:''' Freeware
Depends is a usefull utility that scans Windows executables and reports information concerning the Dynamic-link Libraries (DLLs) that those executables require in order to run.
= Software Used to Compile Swarm 2.4.1 =
{|
! Name
! Verson Used
! License
! Homepage
! Download Area
|-
| ZLib
| 1.2.5
| [http://www.opensource.org/licenses/Zlib ZLib/PNG License]
| [http://www.zlib.net http://www.zlib.net]
| --
|-
| LibFFI
| 3.0.9
| [http://www.opensource.org/licenses/MIT MIT]
| [http://sourceware.org/libffi http://sourceware.org/libffi]
| --
|-
| LibPNG
| 1.5.4
| [http://www.opensource.org/licenses/Zlib ZLib/PNG]
| [http://www.libpng.org/pub/png/libpng.html http://www.libpng.org/pub/png/libpng.html]
| --
|-
| XPM-NoX
| 4.2.0
| [http://www.opensource.org/licenses/MIT MIT]
| unknown
| [http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32 http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32]
|-
| Tcl
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| Tk
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| BLT
| 2.4z
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://blt.sourceforge.net http://blt.sourceforge.net]
| --
|-
| HDF5
| 1.8.7
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://www.hdfgroup.org/HDF5 http://www.hdfgroup.org/HDF5]
| --
|-
| Swarm
| 2.4.1
| [http://www.opensource.org/licenses/GPL-3.0 GPL]
| [http://www.swarm.org http://www.swarm.org]
| [http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
|}
775131f801454f6f5dd1d63bf12d364ab7b843c0
2164
2163
2015-12-03T01:42:35Z
SwarmWikiSysop
5
/* Installing MinGW */
wikitext
text/x-wiki
= Overview =
This documentation provides information on how to use Swarm on Windows with [http://www.mingw.org MinGW] compilers. The following topics will be covered:
* How to run a Swam model compiled with MinGW on Windows: Once you produce a Swarm model using MinGW (or someone gives one to you), how do you run it on other machines without installing Swarm there?
* How to use MinGW to compile your own Swarm models, either during model development or so you can distribute working models to others. This requires installing MinGW and our binary Swarm libraries.
* How to package a model compiled with MinGW so it can be installed and run by itself on Windows machines.
* How to use MinGW to compile the Swarm libraries, in case you want to build your own Swarm binaries.
Each topic is more difficult than the one before it. However the topics are independent in that it is not necessary to know how to compile the Swarm library in order to run a pre-compiled Swarm model or compile your own model against a pre-compiled version of Swarm.
= Using Swarm Models Compiled with MinGW =
A model that has been compiled using MinGW can be installed and run from a Windows computer without installing MinGW or Swarm. An example code is this build of Heatbugs:
[http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe]
However, running a Swarm model requires some support programs and libraries. These are available as
<tt>swarm-2.4.1-win32.zip</tt>, available here:
[http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip]
Unzipping that file will create a folder called <tt>swarm</tt> which should be moved somewhere that is easy to remember. The rest of this tutorial will assume this Swarm folder has been placed at <tt>C:\swarm</tt>.
Before a Swarm model can be run, the <tt>swarm\bin</tt> folder must be added to the Windows <tt>PATH</tt> so that Heatbugs can find necessary libraries when it runs. The <tt>swarm\bin</tt> folder can be ''temporarily'' added to the path by executing the following in the Windows command line (the command line is accessed using the program <tt>cmd.exe</tt>):
<pre>path=%PATH%;C:\swarm\bin</pre>
However, it is possible to have conflicts if other versions of libraries used by Swarm, such as HDF5, are already installed and in your path. And some Swarm programs require that the environment variable SWARMHOME be defined, which will typically not be true. These problems can be avoided by using the following statements instead of the above path command:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%</pre>
You can alternatively add the Swarm folder to your <tt>PATH</tt> permanently by editing the Windows PATH environment variable. A tool like [[#RapidEE|RapidEE]] makes doing so easy, or you can use use Windows control panel > System > Advanced > Environment Variables to add <tt>swarm\bin</tt> to the PATH system variable.
Once the path has been set to include the <tt>swarm\bin</tt> folder, Swarm models can be started through the Windows command line, or by double-clicking on them from the Windows Explorer.
The Heatbugs model can now be run by changing the directory of the command line to the folder holding <tt>heatbugs.exe</tt> and then executing the program. For example, if <tt>heatbugs.exe</tt> is located in <tt>C:\Users\example_user\Downloads</tt>, then the model may be run as follows:
<pre>cd C:\Users\example_user\Downloads
heatbugs.exe</pre>
(or you can just double-click on <tt>heatbugs.exe</tt> from Windows Explorer, which temporarily opens a Windows command terminal while the model runs.)
[[Image:Running_Heatbugs.png|frame|none|alt=Running the Heatbugs model]]
You can also create a simple Windows batch file that sets SWARMHOME and the path and then executes the model. Create a file called, for example <tt>heatbugs.bat</tt> in the same directory where <tt>heatbugs.exe</tt> is, containing these lines:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%
heatbugs.exe</pre>
Then, just double-clicking on <tt>heatbugs.bat</tt> will start the model.
If you try this and get an error that some .dll file is not found, then the problem is likely that the path is not set correctly to include the swarm\bin folder. If instead the program crashes without an error statement, then the problem is more likely that SWARMHOME needs to be set.
= Installing Swarm and MinGW to compile models =
To compile Swarm models from source using MinGW, the following simple steps need to be taken to set up the build environment:
* [[#MinGW|Install MinGW using instructions here]]. Currently only 32-bit MinGW can be used with Swarm. Install all components of MinGW.
* Download compiled Swarm binaries, archived as [http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip swarm-2.4.1-win32.zip]. Unzip the archive and place the extracted folder at <tt>C:\swarm</tt>.
'''NOTE:'''
The archived Swarm binaries '''MUST''' be placed at <tt>C:\swarm</tt> to successfully compile Swarm models. This is because some paths had to be hard-coded by <tt>libtool</tt> during the creation of the binaries.
The final step before you can compile a Swarm model is to set the <tt>SWARMHOME</tt> environment variable so that the "make" program knows where to find the Swarm libraries when compiling your code. There are several ways to do this.
*You can temporarily set SWARMHOME by entering this command in the MinGW shell: <pre>export SWARMHOME=/c/swarm</pre>
*You can edit your Makefile so it starts with: <pre>SWARMHOME=/c/swarm</pre>
*Set SWARMHOME permanently as a Windows environment variable, either by using [[#RapidEE|RapidEE]] or Windows control panel > System > Advanced > Environment Variables to add a new (User or System) variable called SWARMHOME with the value <tt>/c/swarm</tt>.
After MinGW has been installed and the Swarm binaries have been downloaded, Swarm models may be compiled using the MinGW shell. Start up the program MinGW Shell, cd to the directory containing your code and Makefile, and enter the command "Make".
An archive of official Swarm example programs can be downloaded from:
[http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
We will use the "Heatbugs" model as an example of how to compile a Swarm application:
<pre>tar xzf /path/to/downloaded/swarmapps-2.3.0.tar.gz
cd swarmapps-2.3.0/objc/heatbugs
make</pre>
'''VERY IMPORTANT NOTE: MinGW produces two executables called <tt>heatbugs.exe</tt>---one in the <tt>heatbugs</tt> folder and another in the <tt>heatbugs/.libs</tt> folder. You should ignore the executable in the top-level folder, <tt>heatbugs/heatbugs.exe</tt>, as it is merely a compiled wrapper script that executes <tt>heatbugs/.libs/heatbugs.exe</tt>. When distributing compiled models, only use binaries from the <tt>.libs</tt> folder.'''
The resulting executable, <tt>.libs/heatbugs.exe</tt> may be executing by following the steps described above at ''Using Swarm Models Compiled with MinGW''. These steps must include setting the Windows Path to include <tt>C:\swarm\bin</tt>.
= Distributing a Swarm Model for Windows Users =
A major benefit of the MinGW version of Swarm is that models can be distributed for people to use without installing Swarm. A simple way to do this, after the model has been compiled and tested using methods in the previous section, is to create a ZIP archive that contains all the files to run the model.
* Create a directory tree that includes the Swarm binary files. For example, create C:\MySwarmModel and add the Swarm binaries (as described [[Swarm_and_MinGW#Using_Swarm_Models_Compiled_with_MinGW|above]]) to it as a subdirectory tree.
* Create another subdirectory that includes just the compiled model.
* Create a third subdirectory that includes any input files that the model needs and a batch file that sets the path and executes the model.
* Zip the whole tree up for distribution.
The directory tree in the zip file looks like this:
<pre>
C:\MySwarmModel\swarm
\bin
\etc
\include
\lib
\man
\share
\executable\MySwarmModel.exe
\Runfiles\MySwarmModel.bat (and any input files)
</pre>
where the file <tt>MySwarmModel.bat</tt> contains:
<pre>
set SWARMHOME=C:\MySwarmModel\swarm
path=%SWARMHOME%\bin;%PATH%
C:\MySwarmModel\executable\MySwarmModel.exe
</pre>
Then users can run the model just by double-clicking on <tt>MySwarmModel.bat</tt>.
= Building Swarm Using MinGW =
This tutorial provides directions and code for compiling your own Swarm libraries for Windows. It is a bit advanced---some familiarity with compiling software from source in a Linux environment and knowledge of the UNIX command line is assumed.
== Install Required Tools ==
The first step is to download and install tools required for compiling Swarm. These links provide directions:
* [[#MinGW|MinGW]]
* [[#Emacs|Emacs]]
* [[#GPerf|GPerf]]
== Build Support Libraries ==
The next steps are to build and install the libraries that Swarm depends on. A ZIP archive containing all the source code required can be found at:
[http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip]
This archive contains two subdirectories:
* sources: This folder contains the source code for each component.
* patches: This folder contains patchfiles that modfy source code so that MinGW can compile it.
After downloading and extracting the source code archive, open up a MinGW shell and run the following commands:
<pre>cd /path/to/where/swarm/source/was/extracted
mkdir build</pre>
The following steps will all assume your MinGW shell is operating out of the <tt>build</tt> directory. All compiled software will be installed to <tt>/c/swarm</tt> (The Windows Explorer will see the folder appear at <tt>C:\swarm</tt>).
=== ZLib ===
ZLib will be the first library to be built as it is a common dependency for many of the other software components. From the <tt>build</tt> directory, execute the following to build Zlib:
<pre>tar xzf ../sources/zlib-1.2.5.tar.gz
cd zlib-1.2.5
make -f win32/Makefile.gcc</pre>
And then the following commands to install ZLib to <tt>/c/swarm</tt>:
<pre>mkdir -p /c/swarm/bin
mkdir -p /c/swarm/include
mkdir -p /c/swarm/lib
cp zlib1.dll /c/swarm/bin/
cp zconf.h zlib.h /c/swarm/include/
mv libzdll.a libz.dll.a
cp *.a /c/swarm/lib</pre>
=== LibPNG ===
LibPNG will be built next as its only dependency is ZLib. From the <tt>build</tt> directory, execute the following steps to build and install LibPNG:
<pre>tar xjf ../sources/libpng-1.5.4.tar.bz2
cd libpng-1.5.4
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm --with-zlib-prefix=/c/swarm
make
make install</pre>
=== XPM ===
Starting from the <tt>build</tt> directory, the XPM library can be built and installed as follows:
<pre>tar xjf ../sources/xpm-nox-4.2.0.tar.bz2
cd xpm-nox-4.2.0
patch -p1 &lt; ../../patches/xpm-nox-4.2.0-mingw-tcl.patch
make CC=gcc
make install prefix=/c/swarm</pre>
'''Summary of patchfile changes:'''
The patchfile is inherited from the SUSE builds of XPM for MinGW and adds Makefiles and other critical components.
One major modification has been made to the SUSE patchfile---<tt>tcl.h</tt> is included in <tt>xpm.h</tt>. This is required in order to use XPM while Tk is installed. Conversely, this means that this build of XPM cannot be used without having Tk installed.
=== LibFFI ===
Starting from the <tt>build</tt> directory, LibFFI can be built and installed as follows:
<pre>tar xzf ../sources/libffi-3.0.9.tar.gz
cd libffi-3.0.9
./configure --prefix=/c/swarm
make
make install</pre>
The LibFFI headers get installed in a weird place.
<pre>mv /c/swarm/lib/libffi-3.0.9/include/*.h /c/swarm/include
rm -rf /c/swarm/lib/libffi-3.0.9</pre>
=== Tcl ===
Starting from the <tt>build</tt> directory, Tcl can be built and installed as follows:
<pre>tar xzf ../sources/tcl8.4.19-src.tar.gz
cd tcl8.4.19
patch -p1 &lt; ../../patches/tcl-8.4.19-fix-lvalues.patch
cd win
./configure --prefix=/c/swarm
make
make install</pre>
'''Summary of patchfile changes:'''
At two places in the TCL source code, an assignment is made while simultaneously performing a typecast. The typecast and the assignment had to be split into separate operations in order to be acceptable to the MinGW compilers.
=== Tk ===
Starting from the <tt>build</tt> directory, Tk can be built and installed as follows:
<pre>tar xzf ../sources/tk8.4.19-src.tar.gz
cd tk8.4.19/win
./configure --prefix=/c/swarm
make
make install</pre>
=== BLT ===
Starting from the <tt>build</tt> directory, BLT can be built and installed as follows:
<pre>tar xzf ../sources/BLT2.4z.tar.gz
cd blt2.4z
./configure --prefix=/c/swarm --without-x
make
make install</pre>
=== HDF5 (Optional) ===
Getting HDF5 to work with MinGW is a little tricky. It is an optional dependency, so if support for reading and writing <tt>.hdf</tt> files is not needed this section can be skipped.
As of version 1.8.7, HDF5 currently does not compile under MinGW. So, we must wrap pre-compiled binaries for use with MinGW. In order to wrap the binaries, we will need an additional tool called <tt>pexports</tt>. This can be installed using <tt>mingw-get</tt>:
<pre>mingw-get install mingw-utils</pre>
Download 32-bit Windows binaries from the HDF website compiled for use with the Visual Studio compilers (these files have &quot;VS&quot; listed under the ''Compilers'' section). After extracting the archive, the HDF5 libraries can be wrapped for use with MinGW by executing the following commands:
<pre>cd path/to/where/HDF5/was/extracted
for dll in `ls dll/*dll`; do
def_file=`basename $dll .dll`.def
lib_file=lib`basename $dll dll.dll`.a
pexports $dll &gt; $def_file
dlltool -d $def_file -l lib/$lib_file
done</pre>
Next, move the libraries and header files needed to use HDF5 from C into <tt>C:\swarm</tt>:
<pre>cp dll/hdf5dll.dll dll/szip.dll /c/swarm/bin
cp include/* /c/swarm/include
cp lib/libhdf5.a /c/swarm/lib</pre>
Finally, a patch must be applied to the HDF header file <tt>H5public.h</tt> so that it doesn't define <tt>ssize_t</tt>---a constant already defined by MinGW. The required patch is contained in the Swarm MinGW source archive:
<pre>cd /path/to/where/swarm/source/was/extracted
patch -p1 -d /c/swarm &lt; patches/hdf5-1.8.7-mingw.patch</pre>
== Build Swarm ==
Finally, the Swarm libraries themselves can be built. From the <tt>build</tt> directory, execute the following
<pre>tar xzf ../sources/swarm-2.4.1.tar.gz
cd swarm-2.4.1
patch -p1 ../../patches/swarm-2.4.1-mingw.patch
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm \
--with-zlibdir=/c/swarm \
--with-pngdir=/c/swarm \
--with-xpmdir=/c/swarm \
--with-ffidir=/c/swarm \
--with-tcl=/c/swarm/lib \
--with-tk=/c/swarm/lib \
--with-bltdir=/c/swarm
cd avcall
gcc -S avcall-i386.c
cd ..
make
make install</pre>
If you wrapped HDF5 up for use with MinGW, add <tt>--with-hdf5dir=/c/swarm</tt> to the list of arguments passed to <tt>configure</tt>.
'''Summary of patchfile changes:'''
<tt>swarm-2.4.1-mingw.patch</tt> modifies the Swarm source code in the following ways:
* <tt>gettimeofday</tt> is no longer defined in the Swarm sources as MinGW includes this function in its standard library.
* Swarm GUI functions are updated to be compatible with LibPNG 1.5.
* The Swarm <tt>configure</tt> script defines <tt>DATADIR</tt> as a preprocessor macro---this conflicts with variables in the GCC Objective-C library. <tt>DATDIR</tt> is <tt>undef</tt>ed in critical parts of the source code.
* The <tt>sleep</tt> function is aliased to <tt>usleep</tt>---which is the name of the MinGW implementation.
* The way in which Makefiles invoke <tt>gperf</tt> is amended so that it actually produces output.
* NULL checks are added to `zstrdup` in src/defobj/internal.m. Some functions in the Swarm library may attempt to call `zstrdup` on a NULL pointer. (This happens if the SWARMHOME environment variable is not set.) Failing to check for this condition can lead to segfaults. `zstrdup` now returns NULL if passed a NULL string or if `alloc` fails to allocate memory for a duplicate.
Full details are contained in the patchfile.
= Tools =
== MinGW ==
'''Homepage:''' http://www.mingw.org
'''Download Area:''' http://sourceforge.net/projects/mingw/files
'''Version Used:''' 20110530
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
[http://www.mingw.org MinGW] is a set of software that aims to provide an environment where software developed on UNIX-like systems can be easily compiled for Windows. Since Swarm is primarily developed on Linux (a UNIX clone), MinGW can ease the task of creating Swarm models that run on Windows.
MinGW is similar to the [http://www.cygwin.org Cygwin] project. The major difference is that MinGW produces executables that depend only on native Windows libraries while Cygwin executables require special compatibility libraries that are part of the Cygwin distribution.
=== Installing MinGW ===
MinGW can be installed by downloading the "Automated MinGW Installer", which usually has a name like <tt>mingw-get-inst-&lt;date&gt;.exe</tt> where <tt>&lt;date&gt;</tt> is the datestamp for when the installer was packaged. Running this executable will start the installation process. The installer lets you select which optional components to install; make sure all boxes are checked so you '''install all components'''.
[[Image:MinGW_Setup.png|frame|none|alt=Install all available MinGW components]]
The installer downloads all components from the internet. This will take a while, so have a cup of coffee or walk the dog.
See the following section about also installing an optional, more-functional shell window for MinGW.
=== Using MinGW ===
The MinGW compilers are accessible through the &quot;MinGW Shell&quot; which should be located under the MinGW folder in the Start Menu:
[[Image:MinGW_Shell.png|frame|none|alt=Location of MinGW Shell]]
or by running <tt>C:\MinGW\msys\1.0\msys.bat</tt> (if MinGW was installed to its default location).
By default the MinGW shell executes inside of a Windows <tt>cmd.exe</tt> terminal. There are a couple major drawbacks to this:
* You cannot resize the window to full-screen.
* The shell provides limited history scrollback.
MinGW provides a couple of alternative terminals for the MinGW shell which do not have these drawbacks; one of which is called MinTTY. To install MinTTY execute the following in a MinGW shell:
<pre>mingw-get install mintty</pre>
Then the <tt>mintty</tt> command can be used to launch a MinTTY terminal. The MinGW Shell can also be set to launch MinTTY by default by editing the file <tt>C:\MinGW\msys\1.0\msys.bat</tt> and changing the following line (approximately line 58):
<pre>if &quot;x%MSYSCON%&quot; == &quot;xunknown&quot; set MSYSCON=sh.exe</pre>
to:
<pre>if &quot;x%MSYSCON%&quot; == &quot;xunknown&quot; set MSYSCON=mintty.exe</pre>
=== A Note About Paths ===
The MinGW Shell emulates a UNIX <tt>bash</tt> shell and thus uses UNIX-style paths, <tt>/path/to/file</tt>, instead of Windows-style paths, <tt>C:\path\to\file</tt>. One peculiarity of this process is that the shell must deal with the fact that Windows filesystems have multiple roots (<tt>C:</tt>, <tt>D:</tt>, etc.) while a UNIX filesystem only has one root called <tt>/</tt>. The way this is reconciled by the <tt>bash</tt> shell provided with MinGW is that <tt>/c</tt> refers to the root of the <tt>C:</tt> drive, <tt>/d</tt> refers to the root of the <tt>D:</tt> drive and so on and so forth.
The root of the filesystem itself, <tt>/</tt>, also has some caveats. <tt>/</tt> refers to the <tt>mysy</tt> folder, <tt>C:/MinGW/mysys/1.0</tt> in a default installation. <tt>/usr</tt> also refers to the same location. Thus, <tt>/usr/local</tt> and <tt>/local</tt> both refer to <tt>C:/MinGW/mysys/1.0/local</tt>.
=== A Note About MinGW-64 ===
Currently Swarm has been developed and tested against the 32-bit version of MinGW. Hence Swarm models produced this way should run in any version of Windows.
The [MinGW-w64][mingw_65] project produces 64-bit MinGW compilers that can produce 64-bit executables that will only run on 64-bit versions of Windows. These executables benefit from:
* Access to more memory. A 32-bit executable will only be able to allocate ~3 GB of RAM---even if the system has more RAM available.
* Possibly quicker execution speeds due to matching the native architecture of the operating system---however this depends on the types of tasks that the program executes. It has been reported that 64 bit Swarm executables run quicker than 32 bit Swarm executables on Linux.
Currently, no attempt has been made to compile Swarm 2.4.1 with the 64 bit MinGW compilers. If a successful attempt is made, please report it on the [http://www.swarm.org/mailman/listinfo/support Swarm mailing list].
== Emacs ==
'''Homepage:''' http://www.gnu.org/software/emacs
'''Version Used:''' 23.3
'''Download Area:''' http://ftp.gnu.org/gnu/emacs/windows
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GNU Emacs is a text editor that is used by many programmers to edit code. However, Emacs can also be scripted to perform a variety of complicated transformations on text files. The scripts that build the Swarm libraries use Emacs to automate the process of generating some source files. Thus Emacs has to be installed in order to build Swarm from source.
=== Installing Emacs ===
Install Emacs by downloading one of the <tt>emacs-&lt;version
number&gt;-bin-i386.zip</tt> files from the download area. Don't use any of the
files containing <tt>barebin</tt>. After extracting the ZIP archive there will
be an Emacs folder containing a subfolder called <tt>bin</tt>. Add this folder
to your Windows <tt>PATH</tt>. [[#RapidEE|RapidEE]] can help edit the
<tt>PATH</tt> variable.
== GPerf ==
'''Homepage:''' http://www.gnu.org/software/gperf/
'''Download Area:''' http://sourceforge.net/projects/gnuwin32/files/gperf
'''Version Used:''' 3.0.1
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GPerf is a program that produces C code containing hash functions. The scripts
that build the Swarm libraries use GPerf to generate some source code files.
Download <tt>gperf.exe</tt> from the GnuWin32 site on Sourceforge and place it
somewhere on your Windows <tt>PATH</tt>. Again, [[#RapidEE|RapidEE]] can help set the <tt>PATH</tt> variable.
== RapidEE ==
'''Homepage:''' http://www.rapidee.com
'''Version Used:''' 5.0
'''License:''' [http://www.rapidee.com/en/license Freeware]
The Rapid Environment Editor (RapidEE) is a spiffy tool that makes it easy to inspect and alter the value of Windows environment variables, such as the <tt>PATH</tt>. RapidEE may be used to edit &quot;System Variables&quot; which will affect all user accounts or &quot;User Variables&quot; which will affect just the current account. Administrative privileges may be required to edit the System Variables.
[[Image:RapidEE_1.png|frame|none|alt=The different variables RapidEE can edit]]
Right-clicking on the <tt>Path</tt> variable in the System Variables or User Variables will bring up a menu that presents the option to &quot;Add value&quot;:
[[Image:RapidEE_2.png|frame|none|alt=Adding a new value to the PATH]]
Once the new entry has been added, RapidEE must be told to save the changes. Command line shells, such as <tt>cmd.exe</tt>, must be restarted in order for them to notice the changes.
[[Image:RapidEE_3.png|frame|none|alt=Adding and saving a value]]
== Depends ==
'''Homepage:''' http://www.dependencywalker.com/
'''Version Used:''' 2.2
'''License:''' Freeware
Depends is a usefull utility that scans Windows executables and reports information concerning the Dynamic-link Libraries (DLLs) that those executables require in order to run.
= Software Used to Compile Swarm 2.4.1 =
{|
! Name
! Verson Used
! License
! Homepage
! Download Area
|-
| ZLib
| 1.2.5
| [http://www.opensource.org/licenses/Zlib ZLib/PNG License]
| [http://www.zlib.net http://www.zlib.net]
| --
|-
| LibFFI
| 3.0.9
| [http://www.opensource.org/licenses/MIT MIT]
| [http://sourceware.org/libffi http://sourceware.org/libffi]
| --
|-
| LibPNG
| 1.5.4
| [http://www.opensource.org/licenses/Zlib ZLib/PNG]
| [http://www.libpng.org/pub/png/libpng.html http://www.libpng.org/pub/png/libpng.html]
| --
|-
| XPM-NoX
| 4.2.0
| [http://www.opensource.org/licenses/MIT MIT]
| unknown
| [http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32 http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32]
|-
| Tcl
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| Tk
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| BLT
| 2.4z
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://blt.sourceforge.net http://blt.sourceforge.net]
| --
|-
| HDF5
| 1.8.7
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://www.hdfgroup.org/HDF5 http://www.hdfgroup.org/HDF5]
| --
|-
| Swarm
| 2.4.1
| [http://www.opensource.org/licenses/GPL-3.0 GPL]
| [http://www.swarm.org http://www.swarm.org]
| [http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
|}
1b545d59083ff7300952bbf387483add7131bbee
2163
2162
2015-12-03T01:40:36Z
SwarmWikiSysop
5
/* Build Support Libraries */
wikitext
text/x-wiki
= Overview =
This documentation provides information on how to use Swarm on Windows with [http://www.mingw.org MinGW] compilers. The following topics will be covered:
* How to run a Swam model compiled with MinGW on Windows: Once you produce a Swarm model using MinGW (or someone gives one to you), how do you run it on other machines without installing Swarm there?
* How to use MinGW to compile your own Swarm models, either during model development or so you can distribute working models to others. This requires installing MinGW and our binary Swarm libraries.
* How to package a model compiled with MinGW so it can be installed and run by itself on Windows machines.
* How to use MinGW to compile the Swarm libraries, in case you want to build your own Swarm binaries.
Each topic is more difficult than the one before it. However the topics are independent in that it is not necessary to know how to compile the Swarm library in order to run a pre-compiled Swarm model or compile your own model against a pre-compiled version of Swarm.
= Using Swarm Models Compiled with MinGW =
A model that has been compiled using MinGW can be installed and run from a Windows computer without installing MinGW or Swarm. An example code is this build of Heatbugs:
[http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe]
However, running a Swarm model requires some support programs and libraries. These are available as
<tt>swarm-2.4.1-win32.zip</tt>, available here:
[http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip]
Unzipping that file will create a folder called <tt>swarm</tt> which should be moved somewhere that is easy to remember. The rest of this tutorial will assume this Swarm folder has been placed at <tt>C:\swarm</tt>.
Before a Swarm model can be run, the <tt>swarm\bin</tt> folder must be added to the Windows <tt>PATH</tt> so that Heatbugs can find necessary libraries when it runs. The <tt>swarm\bin</tt> folder can be ''temporarily'' added to the path by executing the following in the Windows command line (the command line is accessed using the program <tt>cmd.exe</tt>):
<pre>path=%PATH%;C:\swarm\bin</pre>
However, it is possible to have conflicts if other versions of libraries used by Swarm, such as HDF5, are already installed and in your path. And some Swarm programs require that the environment variable SWARMHOME be defined, which will typically not be true. These problems can be avoided by using the following statements instead of the above path command:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%</pre>
You can alternatively add the Swarm folder to your <tt>PATH</tt> permanently by editing the Windows PATH environment variable. A tool like [[#RapidEE|RapidEE]] makes doing so easy, or you can use use Windows control panel > System > Advanced > Environment Variables to add <tt>swarm\bin</tt> to the PATH system variable.
Once the path has been set to include the <tt>swarm\bin</tt> folder, Swarm models can be started through the Windows command line, or by double-clicking on them from the Windows Explorer.
The Heatbugs model can now be run by changing the directory of the command line to the folder holding <tt>heatbugs.exe</tt> and then executing the program. For example, if <tt>heatbugs.exe</tt> is located in <tt>C:\Users\example_user\Downloads</tt>, then the model may be run as follows:
<pre>cd C:\Users\example_user\Downloads
heatbugs.exe</pre>
(or you can just double-click on <tt>heatbugs.exe</tt> from Windows Explorer, which temporarily opens a Windows command terminal while the model runs.)
[[Image:Running_Heatbugs.png|frame|none|alt=Running the Heatbugs model]]
You can also create a simple Windows batch file that sets SWARMHOME and the path and then executes the model. Create a file called, for example <tt>heatbugs.bat</tt> in the same directory where <tt>heatbugs.exe</tt> is, containing these lines:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%
heatbugs.exe</pre>
Then, just double-clicking on <tt>heatbugs.bat</tt> will start the model.
If you try this and get an error that some .dll file is not found, then the problem is likely that the path is not set correctly to include the swarm\bin folder. If instead the program crashes without an error statement, then the problem is more likely that SWARMHOME needs to be set.
= Installing Swarm and MinGW to compile models =
To compile Swarm models from source using MinGW, the following simple steps need to be taken to set up the build environment:
* [[#MinGW|Install MinGW using instructions here]]. Currently only 32-bit MinGW can be used with Swarm. Install all components of MinGW.
* Download compiled Swarm binaries, archived as [http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip swarm-2.4.1-win32.zip]. Unzip the archive and place the extracted folder at <tt>C:\swarm</tt>.
'''NOTE:'''
The archived Swarm binaries '''MUST''' be placed at <tt>C:\swarm</tt> to successfully compile Swarm models. This is because some paths had to be hard-coded by <tt>libtool</tt> during the creation of the binaries.
The final step before you can compile a Swarm model is to set the <tt>SWARMHOME</tt> environment variable so that the "make" program knows where to find the Swarm libraries when compiling your code. There are several ways to do this.
*You can temporarily set SWARMHOME by entering this command in the MinGW shell: <pre>export SWARMHOME=/c/swarm</pre>
*You can edit your Makefile so it starts with: <pre>SWARMHOME=/c/swarm</pre>
*Set SWARMHOME permanently as a Windows environment variable, either by using [[#RapidEE|RapidEE]] or Windows control panel > System > Advanced > Environment Variables to add a new (User or System) variable called SWARMHOME with the value <tt>/c/swarm</tt>.
After MinGW has been installed and the Swarm binaries have been downloaded, Swarm models may be compiled using the MinGW shell. Start up the program MinGW Shell, cd to the directory containing your code and Makefile, and enter the command "Make".
An archive of official Swarm example programs can be downloaded from:
[http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
We will use the "Heatbugs" model as an example of how to compile a Swarm application:
<pre>tar xzf /path/to/downloaded/swarmapps-2.3.0.tar.gz
cd swarmapps-2.3.0/objc/heatbugs
make</pre>
'''VERY IMPORTANT NOTE: MinGW produces two executables called <tt>heatbugs.exe</tt>---one in the <tt>heatbugs</tt> folder and another in the <tt>heatbugs/.libs</tt> folder. You should ignore the executable in the top-level folder, <tt>heatbugs/heatbugs.exe</tt>, as it is merely a compiled wrapper script that executes <tt>heatbugs/.libs/heatbugs.exe</tt>. When distributing compiled models, only use binaries from the <tt>.libs</tt> folder.'''
The resulting executable, <tt>.libs/heatbugs.exe</tt> may be executing by following the steps described above at ''Using Swarm Models Compiled with MinGW''. These steps must include setting the Windows Path to include <tt>C:\swarm\bin</tt>.
= Distributing a Swarm Model for Windows Users =
A major benefit of the MinGW version of Swarm is that models can be distributed for people to use without installing Swarm. A simple way to do this, after the model has been compiled and tested using methods in the previous section, is to create a ZIP archive that contains all the files to run the model.
* Create a directory tree that includes the Swarm binary files. For example, create C:\MySwarmModel and add the Swarm binaries (as described [[Swarm_and_MinGW#Using_Swarm_Models_Compiled_with_MinGW|above]]) to it as a subdirectory tree.
* Create another subdirectory that includes just the compiled model.
* Create a third subdirectory that includes any input files that the model needs and a batch file that sets the path and executes the model.
* Zip the whole tree up for distribution.
The directory tree in the zip file looks like this:
<pre>
C:\MySwarmModel\swarm
\bin
\etc
\include
\lib
\man
\share
\executable\MySwarmModel.exe
\Runfiles\MySwarmModel.bat (and any input files)
</pre>
where the file <tt>MySwarmModel.bat</tt> contains:
<pre>
set SWARMHOME=C:\MySwarmModel\swarm
path=%SWARMHOME%\bin;%PATH%
C:\MySwarmModel\executable\MySwarmModel.exe
</pre>
Then users can run the model just by double-clicking on <tt>MySwarmModel.bat</tt>.
= Building Swarm Using MinGW =
This tutorial provides directions and code for compiling your own Swarm libraries for Windows. It is a bit advanced---some familiarity with compiling software from source in a Linux environment and knowledge of the UNIX command line is assumed.
== Install Required Tools ==
The first step is to download and install tools required for compiling Swarm. These links provide directions:
* [[#MinGW|MinGW]]
* [[#Emacs|Emacs]]
* [[#GPerf|GPerf]]
== Build Support Libraries ==
The next steps are to build and install the libraries that Swarm depends on. A ZIP archive containing all the source code required can be found at:
[http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip http://download.savannah.gnu.org/releases/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip]
This archive contains two subdirectories:
* sources: This folder contains the source code for each component.
* patches: This folder contains patchfiles that modfy source code so that MinGW can compile it.
After downloading and extracting the source code archive, open up a MinGW shell and run the following commands:
<pre>cd /path/to/where/swarm/source/was/extracted
mkdir build</pre>
The following steps will all assume your MinGW shell is operating out of the <tt>build</tt> directory. All compiled software will be installed to <tt>/c/swarm</tt> (The Windows Explorer will see the folder appear at <tt>C:\swarm</tt>).
=== ZLib ===
ZLib will be the first library to be built as it is a common dependency for many of the other software components. From the <tt>build</tt> directory, execute the following to build Zlib:
<pre>tar xzf ../sources/zlib-1.2.5.tar.gz
cd zlib-1.2.5
make -f win32/Makefile.gcc</pre>
And then the following commands to install ZLib to <tt>/c/swarm</tt>:
<pre>mkdir -p /c/swarm/bin
mkdir -p /c/swarm/include
mkdir -p /c/swarm/lib
cp zlib1.dll /c/swarm/bin/
cp zconf.h zlib.h /c/swarm/include/
mv libzdll.a libz.dll.a
cp *.a /c/swarm/lib</pre>
=== LibPNG ===
LibPNG will be built next as its only dependency is ZLib. From the <tt>build</tt> directory, execute the following steps to build and install LibPNG:
<pre>tar xjf ../sources/libpng-1.5.4.tar.bz2
cd libpng-1.5.4
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm --with-zlib-prefix=/c/swarm
make
make install</pre>
=== XPM ===
Starting from the <tt>build</tt> directory, the XPM library can be built and installed as follows:
<pre>tar xjf ../sources/xpm-nox-4.2.0.tar.bz2
cd xpm-nox-4.2.0
patch -p1 &lt; ../../patches/xpm-nox-4.2.0-mingw-tcl.patch
make CC=gcc
make install prefix=/c/swarm</pre>
'''Summary of patchfile changes:'''
The patchfile is inherited from the SUSE builds of XPM for MinGW and adds Makefiles and other critical components.
One major modification has been made to the SUSE patchfile---<tt>tcl.h</tt> is included in <tt>xpm.h</tt>. This is required in order to use XPM while Tk is installed. Conversely, this means that this build of XPM cannot be used without having Tk installed.
=== LibFFI ===
Starting from the <tt>build</tt> directory, LibFFI can be built and installed as follows:
<pre>tar xzf ../sources/libffi-3.0.9.tar.gz
cd libffi-3.0.9
./configure --prefix=/c/swarm
make
make install</pre>
The LibFFI headers get installed in a weird place.
<pre>mv /c/swarm/lib/libffi-3.0.9/include/*.h /c/swarm/include
rm -rf /c/swarm/lib/libffi-3.0.9</pre>
=== Tcl ===
Starting from the <tt>build</tt> directory, Tcl can be built and installed as follows:
<pre>tar xzf ../sources/tcl8.4.19-src.tar.gz
cd tcl8.4.19
patch -p1 &lt; ../../patches/tcl-8.4.19-fix-lvalues.patch
cd win
./configure --prefix=/c/swarm
make
make install</pre>
'''Summary of patchfile changes:'''
At two places in the TCL source code, an assignment is made while simultaneously performing a typecast. The typecast and the assignment had to be split into separate operations in order to be acceptable to the MinGW compilers.
=== Tk ===
Starting from the <tt>build</tt> directory, Tk can be built and installed as follows:
<pre>tar xzf ../sources/tk8.4.19-src.tar.gz
cd tk8.4.19/win
./configure --prefix=/c/swarm
make
make install</pre>
=== BLT ===
Starting from the <tt>build</tt> directory, BLT can be built and installed as follows:
<pre>tar xzf ../sources/BLT2.4z.tar.gz
cd blt2.4z
./configure --prefix=/c/swarm --without-x
make
make install</pre>
=== HDF5 (Optional) ===
Getting HDF5 to work with MinGW is a little tricky. It is an optional dependency, so if support for reading and writing <tt>.hdf</tt> files is not needed this section can be skipped.
As of version 1.8.7, HDF5 currently does not compile under MinGW. So, we must wrap pre-compiled binaries for use with MinGW. In order to wrap the binaries, we will need an additional tool called <tt>pexports</tt>. This can be installed using <tt>mingw-get</tt>:
<pre>mingw-get install mingw-utils</pre>
Download 32-bit Windows binaries from the HDF website compiled for use with the Visual Studio compilers (these files have &quot;VS&quot; listed under the ''Compilers'' section). After extracting the archive, the HDF5 libraries can be wrapped for use with MinGW by executing the following commands:
<pre>cd path/to/where/HDF5/was/extracted
for dll in `ls dll/*dll`; do
def_file=`basename $dll .dll`.def
lib_file=lib`basename $dll dll.dll`.a
pexports $dll &gt; $def_file
dlltool -d $def_file -l lib/$lib_file
done</pre>
Next, move the libraries and header files needed to use HDF5 from C into <tt>C:\swarm</tt>:
<pre>cp dll/hdf5dll.dll dll/szip.dll /c/swarm/bin
cp include/* /c/swarm/include
cp lib/libhdf5.a /c/swarm/lib</pre>
Finally, a patch must be applied to the HDF header file <tt>H5public.h</tt> so that it doesn't define <tt>ssize_t</tt>---a constant already defined by MinGW. The required patch is contained in the Swarm MinGW source archive:
<pre>cd /path/to/where/swarm/source/was/extracted
patch -p1 -d /c/swarm &lt; patches/hdf5-1.8.7-mingw.patch</pre>
== Build Swarm ==
Finally, the Swarm libraries themselves can be built. From the <tt>build</tt> directory, execute the following
<pre>tar xzf ../sources/swarm-2.4.1.tar.gz
cd swarm-2.4.1
patch -p1 ../../patches/swarm-2.4.1-mingw.patch
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm \
--with-zlibdir=/c/swarm \
--with-pngdir=/c/swarm \
--with-xpmdir=/c/swarm \
--with-ffidir=/c/swarm \
--with-tcl=/c/swarm/lib \
--with-tk=/c/swarm/lib \
--with-bltdir=/c/swarm
cd avcall
gcc -S avcall-i386.c
cd ..
make
make install</pre>
If you wrapped HDF5 up for use with MinGW, add <tt>--with-hdf5dir=/c/swarm</tt> to the list of arguments passed to <tt>configure</tt>.
'''Summary of patchfile changes:'''
<tt>swarm-2.4.1-mingw.patch</tt> modifies the Swarm source code in the following ways:
* <tt>gettimeofday</tt> is no longer defined in the Swarm sources as MinGW includes this function in its standard library.
* Swarm GUI functions are updated to be compatible with LibPNG 1.5.
* The Swarm <tt>configure</tt> script defines <tt>DATADIR</tt> as a preprocessor macro---this conflicts with variables in the GCC Objective-C library. <tt>DATDIR</tt> is <tt>undef</tt>ed in critical parts of the source code.
* The <tt>sleep</tt> function is aliased to <tt>usleep</tt>---which is the name of the MinGW implementation.
* The way in which Makefiles invoke <tt>gperf</tt> is amended so that it actually produces output.
* NULL checks are added to `zstrdup` in src/defobj/internal.m. Some functions in the Swarm library may attempt to call `zstrdup` on a NULL pointer. (This happens if the SWARMHOME environment variable is not set.) Failing to check for this condition can lead to segfaults. `zstrdup` now returns NULL if passed a NULL string or if `alloc` fails to allocate memory for a duplicate.
Full details are contained in the patchfile.
= Tools =
== MinGW ==
'''Homepage:''' http://www.mingw.org
'''Download Area:''' http://sourceforge.net/projects/mingw/files
'''Version Used:''' 20110530
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
[http://www.mingw.org MinGW] is a set of software that aims to provide an environment where software developed on UNIX-like systems can be easily compiled for Windows. Since Swarm is primarily developed on Linux (a UNIX clone), MinGW can ease the task of creating Swarm models that run on Windows.
MinGW is similar to the [http://www.cygwin.org Cygwin] project. The major difference is that MinGW produces executables that depend only on native Windows libraries while Cygwin executables require special compatibility libraries that are part of the Cygwin distribution.
=== Installing MinGW ===
MinGW can be installed by downloading the &quot;Automated MinGW Installer&quot;, which usually has a name like <tt>mingw-get-inst-&lt;date&gt;.exe</tt> where <tt>&lt;date&gt;</tt> is the datestamp for when the installer was packaged. Running this executable will start the installation process. The installer lets you select which optional components to install; make sure all boxes are checked so you '''install all components'''.
[[Image:MinGW_Setup.png|frame|none|alt=Install all available MinGW components]]
The installer downloads all components from the internet. This will take a while, so have a cup of coffee or walk the dog.
See the following section about also installing an optional, more-functional shell window for MinGW.
=== Using MinGW ===
The MinGW compilers are accessible through the &quot;MinGW Shell&quot; which should be located under the MinGW folder in the Start Menu:
[[Image:MinGW_Shell.png|frame|none|alt=Location of MinGW Shell]]
or by running <tt>C:\MinGW\msys\1.0\msys.bat</tt> (if MinGW was installed to its default location).
By default the MinGW shell executes inside of a Windows <tt>cmd.exe</tt> terminal. There are a couple major drawbacks to this:
* You cannot resize the window to full-screen.
* The shell provides limited history scrollback.
MinGW provides a couple of alternative terminals for the MinGW shell which do not have these drawbacks; one of which is called MinTTY. To install MinTTY execute the following in a MinGW shell:
<pre>mingw-get install mintty</pre>
Then the <tt>mintty</tt> command can be used to launch a MinTTY terminal. The MinGW Shell can also be set to launch MinTTY by default by editing the file <tt>C:\MinGW\msys\1.0\msys.bat</tt> and changing the following line (approximately line 58):
<pre>if &quot;x%MSYSCON%&quot; == &quot;xunknown&quot; set MSYSCON=sh.exe</pre>
to:
<pre>if &quot;x%MSYSCON%&quot; == &quot;xunknown&quot; set MSYSCON=mintty.exe</pre>
=== A Note About Paths ===
The MinGW Shell emulates a UNIX <tt>bash</tt> shell and thus uses UNIX-style paths, <tt>/path/to/file</tt>, instead of Windows-style paths, <tt>C:\path\to\file</tt>. One peculiarity of this process is that the shell must deal with the fact that Windows filesystems have multiple roots (<tt>C:</tt>, <tt>D:</tt>, etc.) while a UNIX filesystem only has one root called <tt>/</tt>. The way this is reconciled by the <tt>bash</tt> shell provided with MinGW is that <tt>/c</tt> refers to the root of the <tt>C:</tt> drive, <tt>/d</tt> refers to the root of the <tt>D:</tt> drive and so on and so forth.
The root of the filesystem itself, <tt>/</tt>, also has some caveats. <tt>/</tt> refers to the <tt>mysy</tt> folder, <tt>C:/MinGW/mysys/1.0</tt> in a default installation. <tt>/usr</tt> also refers to the same location. Thus, <tt>/usr/local</tt> and <tt>/local</tt> both refer to <tt>C:/MinGW/mysys/1.0/local</tt>.
=== A Note About MinGW-64 ===
Currently Swarm has been developed and tested against the 32-bit version of MinGW. Hence Swarm models produced this way should run in any version of Windows.
The [MinGW-w64][mingw_65] project produces 64-bit MinGW compilers that can produce 64-bit executables that will only run on 64-bit versions of Windows. These executables benefit from:
* Access to more memory. A 32-bit executable will only be able to allocate ~3 GB of RAM---even if the system has more RAM available.
* Possibly quicker execution speeds due to matching the native architecture of the operating system---however this depends on the types of tasks that the program executes. It has been reported that 64 bit Swarm executables run quicker than 32 bit Swarm executables on Linux.
Currently, no attempt has been made to compile Swarm 2.4.1 with the 64 bit MinGW compilers. If a successful attempt is made, please report it on the [http://www.swarm.org/mailman/listinfo/support Swarm mailing list].
== Emacs ==
'''Homepage:''' http://www.gnu.org/software/emacs
'''Version Used:''' 23.3
'''Download Area:''' http://ftp.gnu.org/gnu/emacs/windows
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GNU Emacs is a text editor that is used by many programmers to edit code. However, Emacs can also be scripted to perform a variety of complicated transformations on text files. The scripts that build the Swarm libraries use Emacs to automate the process of generating some source files. Thus Emacs has to be installed in order to build Swarm from source.
=== Installing Emacs ===
Install Emacs by downloading one of the <tt>emacs-&lt;version
number&gt;-bin-i386.zip</tt> files from the download area. Don't use any of the
files containing <tt>barebin</tt>. After extracting the ZIP archive there will
be an Emacs folder containing a subfolder called <tt>bin</tt>. Add this folder
to your Windows <tt>PATH</tt>. [[#RapidEE|RapidEE]] can help edit the
<tt>PATH</tt> variable.
== GPerf ==
'''Homepage:''' http://www.gnu.org/software/gperf/
'''Download Area:''' http://sourceforge.net/projects/gnuwin32/files/gperf
'''Version Used:''' 3.0.1
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GPerf is a program that produces C code containing hash functions. The scripts
that build the Swarm libraries use GPerf to generate some source code files.
Download <tt>gperf.exe</tt> from the GnuWin32 site on Sourceforge and place it
somewhere on your Windows <tt>PATH</tt>. Again, [[#RapidEE|RapidEE]] can help set the <tt>PATH</tt> variable.
== RapidEE ==
'''Homepage:''' http://www.rapidee.com
'''Version Used:''' 5.0
'''License:''' [http://www.rapidee.com/en/license Freeware]
The Rapid Environment Editor (RapidEE) is a spiffy tool that makes it easy to inspect and alter the value of Windows environment variables, such as the <tt>PATH</tt>. RapidEE may be used to edit &quot;System Variables&quot; which will affect all user accounts or &quot;User Variables&quot; which will affect just the current account. Administrative privileges may be required to edit the System Variables.
[[Image:RapidEE_1.png|frame|none|alt=The different variables RapidEE can edit]]
Right-clicking on the <tt>Path</tt> variable in the System Variables or User Variables will bring up a menu that presents the option to &quot;Add value&quot;:
[[Image:RapidEE_2.png|frame|none|alt=Adding a new value to the PATH]]
Once the new entry has been added, RapidEE must be told to save the changes. Command line shells, such as <tt>cmd.exe</tt>, must be restarted in order for them to notice the changes.
[[Image:RapidEE_3.png|frame|none|alt=Adding and saving a value]]
== Depends ==
'''Homepage:''' http://www.dependencywalker.com/
'''Version Used:''' 2.2
'''License:''' Freeware
Depends is a usefull utility that scans Windows executables and reports information concerning the Dynamic-link Libraries (DLLs) that those executables require in order to run.
= Software Used to Compile Swarm 2.4.1 =
{|
! Name
! Verson Used
! License
! Homepage
! Download Area
|-
| ZLib
| 1.2.5
| [http://www.opensource.org/licenses/Zlib ZLib/PNG License]
| [http://www.zlib.net http://www.zlib.net]
| --
|-
| LibFFI
| 3.0.9
| [http://www.opensource.org/licenses/MIT MIT]
| [http://sourceware.org/libffi http://sourceware.org/libffi]
| --
|-
| LibPNG
| 1.5.4
| [http://www.opensource.org/licenses/Zlib ZLib/PNG]
| [http://www.libpng.org/pub/png/libpng.html http://www.libpng.org/pub/png/libpng.html]
| --
|-
| XPM-NoX
| 4.2.0
| [http://www.opensource.org/licenses/MIT MIT]
| unknown
| [http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32 http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32]
|-
| Tcl
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| Tk
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| BLT
| 2.4z
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://blt.sourceforge.net http://blt.sourceforge.net]
| --
|-
| HDF5
| 1.8.7
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://www.hdfgroup.org/HDF5 http://www.hdfgroup.org/HDF5]
| --
|-
| Swarm
| 2.4.1
| [http://www.opensource.org/licenses/GPL-3.0 GPL]
| [http://www.swarm.org http://www.swarm.org]
| [http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
|}
decfae476cd601242e23d14a1c99ddd21886c4cf
2162
2161
2015-12-03T01:38:02Z
SwarmWikiSysop
5
/* Installing Swarm and MinGW to compile models */
wikitext
text/x-wiki
= Overview =
This documentation provides information on how to use Swarm on Windows with [http://www.mingw.org MinGW] compilers. The following topics will be covered:
* How to run a Swam model compiled with MinGW on Windows: Once you produce a Swarm model using MinGW (or someone gives one to you), how do you run it on other machines without installing Swarm there?
* How to use MinGW to compile your own Swarm models, either during model development or so you can distribute working models to others. This requires installing MinGW and our binary Swarm libraries.
* How to package a model compiled with MinGW so it can be installed and run by itself on Windows machines.
* How to use MinGW to compile the Swarm libraries, in case you want to build your own Swarm binaries.
Each topic is more difficult than the one before it. However the topics are independent in that it is not necessary to know how to compile the Swarm library in order to run a pre-compiled Swarm model or compile your own model against a pre-compiled version of Swarm.
= Using Swarm Models Compiled with MinGW =
A model that has been compiled using MinGW can be installed and run from a Windows computer without installing MinGW or Swarm. An example code is this build of Heatbugs:
[http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe]
However, running a Swarm model requires some support programs and libraries. These are available as
<tt>swarm-2.4.1-win32.zip</tt>, available here:
[http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip]
Unzipping that file will create a folder called <tt>swarm</tt> which should be moved somewhere that is easy to remember. The rest of this tutorial will assume this Swarm folder has been placed at <tt>C:\swarm</tt>.
Before a Swarm model can be run, the <tt>swarm\bin</tt> folder must be added to the Windows <tt>PATH</tt> so that Heatbugs can find necessary libraries when it runs. The <tt>swarm\bin</tt> folder can be ''temporarily'' added to the path by executing the following in the Windows command line (the command line is accessed using the program <tt>cmd.exe</tt>):
<pre>path=%PATH%;C:\swarm\bin</pre>
However, it is possible to have conflicts if other versions of libraries used by Swarm, such as HDF5, are already installed and in your path. And some Swarm programs require that the environment variable SWARMHOME be defined, which will typically not be true. These problems can be avoided by using the following statements instead of the above path command:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%</pre>
You can alternatively add the Swarm folder to your <tt>PATH</tt> permanently by editing the Windows PATH environment variable. A tool like [[#RapidEE|RapidEE]] makes doing so easy, or you can use use Windows control panel > System > Advanced > Environment Variables to add <tt>swarm\bin</tt> to the PATH system variable.
Once the path has been set to include the <tt>swarm\bin</tt> folder, Swarm models can be started through the Windows command line, or by double-clicking on them from the Windows Explorer.
The Heatbugs model can now be run by changing the directory of the command line to the folder holding <tt>heatbugs.exe</tt> and then executing the program. For example, if <tt>heatbugs.exe</tt> is located in <tt>C:\Users\example_user\Downloads</tt>, then the model may be run as follows:
<pre>cd C:\Users\example_user\Downloads
heatbugs.exe</pre>
(or you can just double-click on <tt>heatbugs.exe</tt> from Windows Explorer, which temporarily opens a Windows command terminal while the model runs.)
[[Image:Running_Heatbugs.png|frame|none|alt=Running the Heatbugs model]]
You can also create a simple Windows batch file that sets SWARMHOME and the path and then executes the model. Create a file called, for example <tt>heatbugs.bat</tt> in the same directory where <tt>heatbugs.exe</tt> is, containing these lines:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%
heatbugs.exe</pre>
Then, just double-clicking on <tt>heatbugs.bat</tt> will start the model.
If you try this and get an error that some .dll file is not found, then the problem is likely that the path is not set correctly to include the swarm\bin folder. If instead the program crashes without an error statement, then the problem is more likely that SWARMHOME needs to be set.
= Installing Swarm and MinGW to compile models =
To compile Swarm models from source using MinGW, the following simple steps need to be taken to set up the build environment:
* [[#MinGW|Install MinGW using instructions here]]. Currently only 32-bit MinGW can be used with Swarm. Install all components of MinGW.
* Download compiled Swarm binaries, archived as [http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip swarm-2.4.1-win32.zip]. Unzip the archive and place the extracted folder at <tt>C:\swarm</tt>.
'''NOTE:'''
The archived Swarm binaries '''MUST''' be placed at <tt>C:\swarm</tt> to successfully compile Swarm models. This is because some paths had to be hard-coded by <tt>libtool</tt> during the creation of the binaries.
The final step before you can compile a Swarm model is to set the <tt>SWARMHOME</tt> environment variable so that the "make" program knows where to find the Swarm libraries when compiling your code. There are several ways to do this.
*You can temporarily set SWARMHOME by entering this command in the MinGW shell: <pre>export SWARMHOME=/c/swarm</pre>
*You can edit your Makefile so it starts with: <pre>SWARMHOME=/c/swarm</pre>
*Set SWARMHOME permanently as a Windows environment variable, either by using [[#RapidEE|RapidEE]] or Windows control panel > System > Advanced > Environment Variables to add a new (User or System) variable called SWARMHOME with the value <tt>/c/swarm</tt>.
After MinGW has been installed and the Swarm binaries have been downloaded, Swarm models may be compiled using the MinGW shell. Start up the program MinGW Shell, cd to the directory containing your code and Makefile, and enter the command "Make".
An archive of official Swarm example programs can be downloaded from:
[http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://download.savannah.gnu.org/releases/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
We will use the "Heatbugs" model as an example of how to compile a Swarm application:
<pre>tar xzf /path/to/downloaded/swarmapps-2.3.0.tar.gz
cd swarmapps-2.3.0/objc/heatbugs
make</pre>
'''VERY IMPORTANT NOTE: MinGW produces two executables called <tt>heatbugs.exe</tt>---one in the <tt>heatbugs</tt> folder and another in the <tt>heatbugs/.libs</tt> folder. You should ignore the executable in the top-level folder, <tt>heatbugs/heatbugs.exe</tt>, as it is merely a compiled wrapper script that executes <tt>heatbugs/.libs/heatbugs.exe</tt>. When distributing compiled models, only use binaries from the <tt>.libs</tt> folder.'''
The resulting executable, <tt>.libs/heatbugs.exe</tt> may be executing by following the steps described above at ''Using Swarm Models Compiled with MinGW''. These steps must include setting the Windows Path to include <tt>C:\swarm\bin</tt>.
= Distributing a Swarm Model for Windows Users =
A major benefit of the MinGW version of Swarm is that models can be distributed for people to use without installing Swarm. A simple way to do this, after the model has been compiled and tested using methods in the previous section, is to create a ZIP archive that contains all the files to run the model.
* Create a directory tree that includes the Swarm binary files. For example, create C:\MySwarmModel and add the Swarm binaries (as described [[Swarm_and_MinGW#Using_Swarm_Models_Compiled_with_MinGW|above]]) to it as a subdirectory tree.
* Create another subdirectory that includes just the compiled model.
* Create a third subdirectory that includes any input files that the model needs and a batch file that sets the path and executes the model.
* Zip the whole tree up for distribution.
The directory tree in the zip file looks like this:
<pre>
C:\MySwarmModel\swarm
\bin
\etc
\include
\lib
\man
\share
\executable\MySwarmModel.exe
\Runfiles\MySwarmModel.bat (and any input files)
</pre>
where the file <tt>MySwarmModel.bat</tt> contains:
<pre>
set SWARMHOME=C:\MySwarmModel\swarm
path=%SWARMHOME%\bin;%PATH%
C:\MySwarmModel\executable\MySwarmModel.exe
</pre>
Then users can run the model just by double-clicking on <tt>MySwarmModel.bat</tt>.
= Building Swarm Using MinGW =
This tutorial provides directions and code for compiling your own Swarm libraries for Windows. It is a bit advanced---some familiarity with compiling software from source in a Linux environment and knowledge of the UNIX command line is assumed.
== Install Required Tools ==
The first step is to download and install tools required for compiling Swarm. These links provide directions:
* [[#MinGW|MinGW]]
* [[#Emacs|Emacs]]
* [[#GPerf|GPerf]]
== Build Support Libraries ==
The next steps are to build and install the libraries that Swarm depends on. A ZIP archive containing all the source code required can be found at:
[http://ftp.swarm.org/pub/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip http://ftp.swarm.org/pub/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip]
This archive contains two subdirectories:
* sources: This folder contains the source code for each component.
* patches: This folder contains patchfiles that modfy source code so that MinGW can compile it.
After downloading and extracting the source code archive, open up a MinGW shell and run the following commands:
<pre>cd /path/to/where/swarm/source/was/extracted
mkdir build</pre>
The following steps will all assume your MinGW shell is operating out of the <tt>build</tt> directory. All compiled software will be installed to <tt>/c/swarm</tt> (The Windows Explorer will see the folder appear at <tt>C:\swarm</tt>).
=== ZLib ===
ZLib will be the first library to be built as it is a common dependency for many of the other software components. From the <tt>build</tt> directory, execute the following to build Zlib:
<pre>tar xzf ../sources/zlib-1.2.5.tar.gz
cd zlib-1.2.5
make -f win32/Makefile.gcc</pre>
And then the following commands to install ZLib to <tt>/c/swarm</tt>:
<pre>mkdir -p /c/swarm/bin
mkdir -p /c/swarm/include
mkdir -p /c/swarm/lib
cp zlib1.dll /c/swarm/bin/
cp zconf.h zlib.h /c/swarm/include/
mv libzdll.a libz.dll.a
cp *.a /c/swarm/lib</pre>
=== LibPNG ===
LibPNG will be built next as its only dependency is ZLib. From the <tt>build</tt> directory, execute the following steps to build and install LibPNG:
<pre>tar xjf ../sources/libpng-1.5.4.tar.bz2
cd libpng-1.5.4
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm --with-zlib-prefix=/c/swarm
make
make install</pre>
=== XPM ===
Starting from the <tt>build</tt> directory, the XPM library can be built and installed as follows:
<pre>tar xjf ../sources/xpm-nox-4.2.0.tar.bz2
cd xpm-nox-4.2.0
patch -p1 &lt; ../../patches/xpm-nox-4.2.0-mingw-tcl.patch
make CC=gcc
make install prefix=/c/swarm</pre>
'''Summary of patchfile changes:'''
The patchfile is inherited from the SUSE builds of XPM for MinGW and adds Makefiles and other critical components.
One major modification has been made to the SUSE patchfile---<tt>tcl.h</tt> is included in <tt>xpm.h</tt>. This is required in order to use XPM while Tk is installed. Conversely, this means that this build of XPM cannot be used without having Tk installed.
=== LibFFI ===
Starting from the <tt>build</tt> directory, LibFFI can be built and installed as follows:
<pre>tar xzf ../sources/libffi-3.0.9.tar.gz
cd libffi-3.0.9
./configure --prefix=/c/swarm
make
make install</pre>
The LibFFI headers get installed in a weird place.
<pre>mv /c/swarm/lib/libffi-3.0.9/include/*.h /c/swarm/include
rm -rf /c/swarm/lib/libffi-3.0.9</pre>
=== Tcl ===
Starting from the <tt>build</tt> directory, Tcl can be built and installed as follows:
<pre>tar xzf ../sources/tcl8.4.19-src.tar.gz
cd tcl8.4.19
patch -p1 &lt; ../../patches/tcl-8.4.19-fix-lvalues.patch
cd win
./configure --prefix=/c/swarm
make
make install</pre>
'''Summary of patchfile changes:'''
At two places in the TCL source code, an assignment is made while simultaneously performing a typecast. The typecast and the assignment had to be split into separate operations in order to be acceptable to the MinGW compilers.
=== Tk ===
Starting from the <tt>build</tt> directory, Tk can be built and installed as follows:
<pre>tar xzf ../sources/tk8.4.19-src.tar.gz
cd tk8.4.19/win
./configure --prefix=/c/swarm
make
make install</pre>
=== BLT ===
Starting from the <tt>build</tt> directory, BLT can be built and installed as follows:
<pre>tar xzf ../sources/BLT2.4z.tar.gz
cd blt2.4z
./configure --prefix=/c/swarm --without-x
make
make install</pre>
=== HDF5 (Optional) ===
Getting HDF5 to work with MinGW is a little tricky. It is an optional dependency, so if support for reading and writing <tt>.hdf</tt> files is not needed this section can be skipped.
As of version 1.8.7, HDF5 currently does not compile under MinGW. So, we must wrap pre-compiled binaries for use with MinGW. In order to wrap the binaries, we will need an additional tool called <tt>pexports</tt>. This can be installed using <tt>mingw-get</tt>:
<pre>mingw-get install mingw-utils</pre>
Download 32-bit Windows binaries from the HDF website compiled for use with the Visual Studio compilers (these files have &quot;VS&quot; listed under the ''Compilers'' section). After extracting the archive, the HDF5 libraries can be wrapped for use with MinGW by executing the following commands:
<pre>cd path/to/where/HDF5/was/extracted
for dll in `ls dll/*dll`; do
def_file=`basename $dll .dll`.def
lib_file=lib`basename $dll dll.dll`.a
pexports $dll &gt; $def_file
dlltool -d $def_file -l lib/$lib_file
done</pre>
Next, move the libraries and header files needed to use HDF5 from C into <tt>C:\swarm</tt>:
<pre>cp dll/hdf5dll.dll dll/szip.dll /c/swarm/bin
cp include/* /c/swarm/include
cp lib/libhdf5.a /c/swarm/lib</pre>
Finally, a patch must be applied to the HDF header file <tt>H5public.h</tt> so that it doesn't define <tt>ssize_t</tt>---a constant already defined by MinGW. The required patch is contained in the Swarm MinGW source archive:
<pre>cd /path/to/where/swarm/source/was/extracted
patch -p1 -d /c/swarm &lt; patches/hdf5-1.8.7-mingw.patch</pre>
== Build Swarm ==
Finally, the Swarm libraries themselves can be built. From the <tt>build</tt> directory, execute the following
<pre>tar xzf ../sources/swarm-2.4.1.tar.gz
cd swarm-2.4.1
patch -p1 ../../patches/swarm-2.4.1-mingw.patch
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm \
--with-zlibdir=/c/swarm \
--with-pngdir=/c/swarm \
--with-xpmdir=/c/swarm \
--with-ffidir=/c/swarm \
--with-tcl=/c/swarm/lib \
--with-tk=/c/swarm/lib \
--with-bltdir=/c/swarm
cd avcall
gcc -S avcall-i386.c
cd ..
make
make install</pre>
If you wrapped HDF5 up for use with MinGW, add <tt>--with-hdf5dir=/c/swarm</tt> to the list of arguments passed to <tt>configure</tt>.
'''Summary of patchfile changes:'''
<tt>swarm-2.4.1-mingw.patch</tt> modifies the Swarm source code in the following ways:
* <tt>gettimeofday</tt> is no longer defined in the Swarm sources as MinGW includes this function in its standard library.
* Swarm GUI functions are updated to be compatible with LibPNG 1.5.
* The Swarm <tt>configure</tt> script defines <tt>DATADIR</tt> as a preprocessor macro---this conflicts with variables in the GCC Objective-C library. <tt>DATDIR</tt> is <tt>undef</tt>ed in critical parts of the source code.
* The <tt>sleep</tt> function is aliased to <tt>usleep</tt>---which is the name of the MinGW implementation.
* The way in which Makefiles invoke <tt>gperf</tt> is amended so that it actually produces output.
* NULL checks are added to `zstrdup` in src/defobj/internal.m. Some functions in the Swarm library may attempt to call `zstrdup` on a NULL pointer. (This happens if the SWARMHOME environment variable is not set.) Failing to check for this condition can lead to segfaults. `zstrdup` now returns NULL if passed a NULL string or if `alloc` fails to allocate memory for a duplicate.
Full details are contained in the patchfile.
= Tools =
== MinGW ==
'''Homepage:''' http://www.mingw.org
'''Download Area:''' http://sourceforge.net/projects/mingw/files
'''Version Used:''' 20110530
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
[http://www.mingw.org MinGW] is a set of software that aims to provide an environment where software developed on UNIX-like systems can be easily compiled for Windows. Since Swarm is primarily developed on Linux (a UNIX clone), MinGW can ease the task of creating Swarm models that run on Windows.
MinGW is similar to the [http://www.cygwin.org Cygwin] project. The major difference is that MinGW produces executables that depend only on native Windows libraries while Cygwin executables require special compatibility libraries that are part of the Cygwin distribution.
=== Installing MinGW ===
MinGW can be installed by downloading the &quot;Automated MinGW Installer&quot;, which usually has a name like <tt>mingw-get-inst-&lt;date&gt;.exe</tt> where <tt>&lt;date&gt;</tt> is the datestamp for when the installer was packaged. Running this executable will start the installation process. The installer lets you select which optional components to install; make sure all boxes are checked so you '''install all components'''.
[[Image:MinGW_Setup.png|frame|none|alt=Install all available MinGW components]]
The installer downloads all components from the internet. This will take a while, so have a cup of coffee or walk the dog.
See the following section about also installing an optional, more-functional shell window for MinGW.
=== Using MinGW ===
The MinGW compilers are accessible through the &quot;MinGW Shell&quot; which should be located under the MinGW folder in the Start Menu:
[[Image:MinGW_Shell.png|frame|none|alt=Location of MinGW Shell]]
or by running <tt>C:\MinGW\msys\1.0\msys.bat</tt> (if MinGW was installed to its default location).
By default the MinGW shell executes inside of a Windows <tt>cmd.exe</tt> terminal. There are a couple major drawbacks to this:
* You cannot resize the window to full-screen.
* The shell provides limited history scrollback.
MinGW provides a couple of alternative terminals for the MinGW shell which do not have these drawbacks; one of which is called MinTTY. To install MinTTY execute the following in a MinGW shell:
<pre>mingw-get install mintty</pre>
Then the <tt>mintty</tt> command can be used to launch a MinTTY terminal. The MinGW Shell can also be set to launch MinTTY by default by editing the file <tt>C:\MinGW\msys\1.0\msys.bat</tt> and changing the following line (approximately line 58):
<pre>if &quot;x%MSYSCON%&quot; == &quot;xunknown&quot; set MSYSCON=sh.exe</pre>
to:
<pre>if &quot;x%MSYSCON%&quot; == &quot;xunknown&quot; set MSYSCON=mintty.exe</pre>
=== A Note About Paths ===
The MinGW Shell emulates a UNIX <tt>bash</tt> shell and thus uses UNIX-style paths, <tt>/path/to/file</tt>, instead of Windows-style paths, <tt>C:\path\to\file</tt>. One peculiarity of this process is that the shell must deal with the fact that Windows filesystems have multiple roots (<tt>C:</tt>, <tt>D:</tt>, etc.) while a UNIX filesystem only has one root called <tt>/</tt>. The way this is reconciled by the <tt>bash</tt> shell provided with MinGW is that <tt>/c</tt> refers to the root of the <tt>C:</tt> drive, <tt>/d</tt> refers to the root of the <tt>D:</tt> drive and so on and so forth.
The root of the filesystem itself, <tt>/</tt>, also has some caveats. <tt>/</tt> refers to the <tt>mysy</tt> folder, <tt>C:/MinGW/mysys/1.0</tt> in a default installation. <tt>/usr</tt> also refers to the same location. Thus, <tt>/usr/local</tt> and <tt>/local</tt> both refer to <tt>C:/MinGW/mysys/1.0/local</tt>.
=== A Note About MinGW-64 ===
Currently Swarm has been developed and tested against the 32-bit version of MinGW. Hence Swarm models produced this way should run in any version of Windows.
The [MinGW-w64][mingw_65] project produces 64-bit MinGW compilers that can produce 64-bit executables that will only run on 64-bit versions of Windows. These executables benefit from:
* Access to more memory. A 32-bit executable will only be able to allocate ~3 GB of RAM---even if the system has more RAM available.
* Possibly quicker execution speeds due to matching the native architecture of the operating system---however this depends on the types of tasks that the program executes. It has been reported that 64 bit Swarm executables run quicker than 32 bit Swarm executables on Linux.
Currently, no attempt has been made to compile Swarm 2.4.1 with the 64 bit MinGW compilers. If a successful attempt is made, please report it on the [http://www.swarm.org/mailman/listinfo/support Swarm mailing list].
== Emacs ==
'''Homepage:''' http://www.gnu.org/software/emacs
'''Version Used:''' 23.3
'''Download Area:''' http://ftp.gnu.org/gnu/emacs/windows
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GNU Emacs is a text editor that is used by many programmers to edit code. However, Emacs can also be scripted to perform a variety of complicated transformations on text files. The scripts that build the Swarm libraries use Emacs to automate the process of generating some source files. Thus Emacs has to be installed in order to build Swarm from source.
=== Installing Emacs ===
Install Emacs by downloading one of the <tt>emacs-&lt;version
number&gt;-bin-i386.zip</tt> files from the download area. Don't use any of the
files containing <tt>barebin</tt>. After extracting the ZIP archive there will
be an Emacs folder containing a subfolder called <tt>bin</tt>. Add this folder
to your Windows <tt>PATH</tt>. [[#RapidEE|RapidEE]] can help edit the
<tt>PATH</tt> variable.
== GPerf ==
'''Homepage:''' http://www.gnu.org/software/gperf/
'''Download Area:''' http://sourceforge.net/projects/gnuwin32/files/gperf
'''Version Used:''' 3.0.1
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GPerf is a program that produces C code containing hash functions. The scripts
that build the Swarm libraries use GPerf to generate some source code files.
Download <tt>gperf.exe</tt> from the GnuWin32 site on Sourceforge and place it
somewhere on your Windows <tt>PATH</tt>. Again, [[#RapidEE|RapidEE]] can help set the <tt>PATH</tt> variable.
== RapidEE ==
'''Homepage:''' http://www.rapidee.com
'''Version Used:''' 5.0
'''License:''' [http://www.rapidee.com/en/license Freeware]
The Rapid Environment Editor (RapidEE) is a spiffy tool that makes it easy to inspect and alter the value of Windows environment variables, such as the <tt>PATH</tt>. RapidEE may be used to edit &quot;System Variables&quot; which will affect all user accounts or &quot;User Variables&quot; which will affect just the current account. Administrative privileges may be required to edit the System Variables.
[[Image:RapidEE_1.png|frame|none|alt=The different variables RapidEE can edit]]
Right-clicking on the <tt>Path</tt> variable in the System Variables or User Variables will bring up a menu that presents the option to &quot;Add value&quot;:
[[Image:RapidEE_2.png|frame|none|alt=Adding a new value to the PATH]]
Once the new entry has been added, RapidEE must be told to save the changes. Command line shells, such as <tt>cmd.exe</tt>, must be restarted in order for them to notice the changes.
[[Image:RapidEE_3.png|frame|none|alt=Adding and saving a value]]
== Depends ==
'''Homepage:''' http://www.dependencywalker.com/
'''Version Used:''' 2.2
'''License:''' Freeware
Depends is a usefull utility that scans Windows executables and reports information concerning the Dynamic-link Libraries (DLLs) that those executables require in order to run.
= Software Used to Compile Swarm 2.4.1 =
{|
! Name
! Verson Used
! License
! Homepage
! Download Area
|-
| ZLib
| 1.2.5
| [http://www.opensource.org/licenses/Zlib ZLib/PNG License]
| [http://www.zlib.net http://www.zlib.net]
| --
|-
| LibFFI
| 3.0.9
| [http://www.opensource.org/licenses/MIT MIT]
| [http://sourceware.org/libffi http://sourceware.org/libffi]
| --
|-
| LibPNG
| 1.5.4
| [http://www.opensource.org/licenses/Zlib ZLib/PNG]
| [http://www.libpng.org/pub/png/libpng.html http://www.libpng.org/pub/png/libpng.html]
| --
|-
| XPM-NoX
| 4.2.0
| [http://www.opensource.org/licenses/MIT MIT]
| unknown
| [http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32 http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32]
|-
| Tcl
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| Tk
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| BLT
| 2.4z
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://blt.sourceforge.net http://blt.sourceforge.net]
| --
|-
| HDF5
| 1.8.7
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://www.hdfgroup.org/HDF5 http://www.hdfgroup.org/HDF5]
| --
|-
| Swarm
| 2.4.1
| [http://www.opensource.org/licenses/GPL-3.0 GPL]
| [http://www.swarm.org http://www.swarm.org]
| [http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
|}
e25f9e399dca9a0278f2ff48b84dc76877d7577c
2161
2159
2015-12-03T01:33:50Z
SwarmWikiSysop
5
/* Installing Swarm and MinGW to compile models */
wikitext
text/x-wiki
= Overview =
This documentation provides information on how to use Swarm on Windows with [http://www.mingw.org MinGW] compilers. The following topics will be covered:
* How to run a Swam model compiled with MinGW on Windows: Once you produce a Swarm model using MinGW (or someone gives one to you), how do you run it on other machines without installing Swarm there?
* How to use MinGW to compile your own Swarm models, either during model development or so you can distribute working models to others. This requires installing MinGW and our binary Swarm libraries.
* How to package a model compiled with MinGW so it can be installed and run by itself on Windows machines.
* How to use MinGW to compile the Swarm libraries, in case you want to build your own Swarm binaries.
Each topic is more difficult than the one before it. However the topics are independent in that it is not necessary to know how to compile the Swarm library in order to run a pre-compiled Swarm model or compile your own model against a pre-compiled version of Swarm.
= Using Swarm Models Compiled with MinGW =
A model that has been compiled using MinGW can be installed and run from a Windows computer without installing MinGW or Swarm. An example code is this build of Heatbugs:
[http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe]
However, running a Swarm model requires some support programs and libraries. These are available as
<tt>swarm-2.4.1-win32.zip</tt>, available here:
[http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip]
Unzipping that file will create a folder called <tt>swarm</tt> which should be moved somewhere that is easy to remember. The rest of this tutorial will assume this Swarm folder has been placed at <tt>C:\swarm</tt>.
Before a Swarm model can be run, the <tt>swarm\bin</tt> folder must be added to the Windows <tt>PATH</tt> so that Heatbugs can find necessary libraries when it runs. The <tt>swarm\bin</tt> folder can be ''temporarily'' added to the path by executing the following in the Windows command line (the command line is accessed using the program <tt>cmd.exe</tt>):
<pre>path=%PATH%;C:\swarm\bin</pre>
However, it is possible to have conflicts if other versions of libraries used by Swarm, such as HDF5, are already installed and in your path. And some Swarm programs require that the environment variable SWARMHOME be defined, which will typically not be true. These problems can be avoided by using the following statements instead of the above path command:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%</pre>
You can alternatively add the Swarm folder to your <tt>PATH</tt> permanently by editing the Windows PATH environment variable. A tool like [[#RapidEE|RapidEE]] makes doing so easy, or you can use use Windows control panel > System > Advanced > Environment Variables to add <tt>swarm\bin</tt> to the PATH system variable.
Once the path has been set to include the <tt>swarm\bin</tt> folder, Swarm models can be started through the Windows command line, or by double-clicking on them from the Windows Explorer.
The Heatbugs model can now be run by changing the directory of the command line to the folder holding <tt>heatbugs.exe</tt> and then executing the program. For example, if <tt>heatbugs.exe</tt> is located in <tt>C:\Users\example_user\Downloads</tt>, then the model may be run as follows:
<pre>cd C:\Users\example_user\Downloads
heatbugs.exe</pre>
(or you can just double-click on <tt>heatbugs.exe</tt> from Windows Explorer, which temporarily opens a Windows command terminal while the model runs.)
[[Image:Running_Heatbugs.png|frame|none|alt=Running the Heatbugs model]]
You can also create a simple Windows batch file that sets SWARMHOME and the path and then executes the model. Create a file called, for example <tt>heatbugs.bat</tt> in the same directory where <tt>heatbugs.exe</tt> is, containing these lines:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%
heatbugs.exe</pre>
Then, just double-clicking on <tt>heatbugs.bat</tt> will start the model.
If you try this and get an error that some .dll file is not found, then the problem is likely that the path is not set correctly to include the swarm\bin folder. If instead the program crashes without an error statement, then the problem is more likely that SWARMHOME needs to be set.
= Installing Swarm and MinGW to compile models =
To compile Swarm models from source using MinGW, the following simple steps need to be taken to set up the build environment:
* [[#MinGW|Install MinGW using instructions here]]. Currently only 32-bit MinGW can be used with Swarm. Install all components of MinGW.
* Download compiled Swarm binaries, archived as [http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip swarm-2.4.1-win32.zip]. Unzip the archive and place the extracted folder at <tt>C:\swarm</tt>.
'''NOTE:'''
The archived Swarm binaries '''MUST''' be placed at <tt>C:\swarm</tt> to successfully compile Swarm models. This is because some paths had to be hard-coded by <tt>libtool</tt> during the creation of the binaries.
The final step before you can compile a Swarm model is to set the <tt>SWARMHOME</tt> environment variable so that the "make" program knows where to find the Swarm libraries when compiling your code. There are several ways to do this.
*You can temporarily set SWARMHOME by entering this command in the MinGW shell: <pre>export SWARMHOME=/c/swarm</pre>
*You can edit your Makefile so it starts with: <pre>SWARMHOME=/c/swarm</pre>
*Set SWARMHOME permanently as a Windows environment variable, either by using [[#RapidEE|RapidEE]] or Windows control panel > System > Advanced > Environment Variables to add a new (User or System) variable called SWARMHOME with the value <tt>/c/swarm</tt>.
After MinGW has been installed and the Swarm binaries have been downloaded, Swarm models may be compiled using the MinGW shell. Start up the program MinGW Shell, cd to the directory containing your code and Makefile, and enter the command "Make".
An archive of official Swarm example programs can be downloaded from:
[http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
We will use the &quot;Heatbugs&quot; model as an example of how to compile a Swarm application:
<pre>tar xzf /path/to/downloaded/swarmapps-2.3.0.tar.gz
cd swarmapps-2.3.0/objc/heatbugs
make</pre>
'''VERY IMPORTANT NOTE: MinGW produces two executables called <tt>heatbugs.exe</tt>---one in the <tt>heatbugs</tt> folder and another in the <tt>heatbugs/.libs</tt> folder. You should ignore the executable in the top-level folder, <tt>heatbugs/heatbugs.exe</tt>, as it is merely a compiled wrapper script that executes <tt>heatbugs/.libs/heatbugs.exe</tt>. When distributing compiled models, only use binaries from the <tt>.libs</tt> folder.'''
The resulting executable, <tt>.libs/heatbugs.exe</tt> may be executing by following the steps described above at ''Using Swarm Models Compiled with MinGW''. These steps must include setting the Windows Path to include <tt>C:\swarm\bin</tt>.
= Distributing a Swarm Model for Windows Users =
A major benefit of the MinGW version of Swarm is that models can be distributed for people to use without installing Swarm. A simple way to do this, after the model has been compiled and tested using methods in the previous section, is to create a ZIP archive that contains all the files to run the model.
* Create a directory tree that includes the Swarm binary files. For example, create C:\MySwarmModel and add the Swarm binaries (as described [[Swarm_and_MinGW#Using_Swarm_Models_Compiled_with_MinGW|above]]) to it as a subdirectory tree.
* Create another subdirectory that includes just the compiled model.
* Create a third subdirectory that includes any input files that the model needs and a batch file that sets the path and executes the model.
* Zip the whole tree up for distribution.
The directory tree in the zip file looks like this:
<pre>
C:\MySwarmModel\swarm
\bin
\etc
\include
\lib
\man
\share
\executable\MySwarmModel.exe
\Runfiles\MySwarmModel.bat (and any input files)
</pre>
where the file <tt>MySwarmModel.bat</tt> contains:
<pre>
set SWARMHOME=C:\MySwarmModel\swarm
path=%SWARMHOME%\bin;%PATH%
C:\MySwarmModel\executable\MySwarmModel.exe
</pre>
Then users can run the model just by double-clicking on <tt>MySwarmModel.bat</tt>.
= Building Swarm Using MinGW =
This tutorial provides directions and code for compiling your own Swarm libraries for Windows. It is a bit advanced---some familiarity with compiling software from source in a Linux environment and knowledge of the UNIX command line is assumed.
== Install Required Tools ==
The first step is to download and install tools required for compiling Swarm. These links provide directions:
* [[#MinGW|MinGW]]
* [[#Emacs|Emacs]]
* [[#GPerf|GPerf]]
== Build Support Libraries ==
The next steps are to build and install the libraries that Swarm depends on. A ZIP archive containing all the source code required can be found at:
[http://ftp.swarm.org/pub/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip http://ftp.swarm.org/pub/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip]
This archive contains two subdirectories:
* sources: This folder contains the source code for each component.
* patches: This folder contains patchfiles that modfy source code so that MinGW can compile it.
After downloading and extracting the source code archive, open up a MinGW shell and run the following commands:
<pre>cd /path/to/where/swarm/source/was/extracted
mkdir build</pre>
The following steps will all assume your MinGW shell is operating out of the <tt>build</tt> directory. All compiled software will be installed to <tt>/c/swarm</tt> (The Windows Explorer will see the folder appear at <tt>C:\swarm</tt>).
=== ZLib ===
ZLib will be the first library to be built as it is a common dependency for many of the other software components. From the <tt>build</tt> directory, execute the following to build Zlib:
<pre>tar xzf ../sources/zlib-1.2.5.tar.gz
cd zlib-1.2.5
make -f win32/Makefile.gcc</pre>
And then the following commands to install ZLib to <tt>/c/swarm</tt>:
<pre>mkdir -p /c/swarm/bin
mkdir -p /c/swarm/include
mkdir -p /c/swarm/lib
cp zlib1.dll /c/swarm/bin/
cp zconf.h zlib.h /c/swarm/include/
mv libzdll.a libz.dll.a
cp *.a /c/swarm/lib</pre>
=== LibPNG ===
LibPNG will be built next as its only dependency is ZLib. From the <tt>build</tt> directory, execute the following steps to build and install LibPNG:
<pre>tar xjf ../sources/libpng-1.5.4.tar.bz2
cd libpng-1.5.4
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm --with-zlib-prefix=/c/swarm
make
make install</pre>
=== XPM ===
Starting from the <tt>build</tt> directory, the XPM library can be built and installed as follows:
<pre>tar xjf ../sources/xpm-nox-4.2.0.tar.bz2
cd xpm-nox-4.2.0
patch -p1 &lt; ../../patches/xpm-nox-4.2.0-mingw-tcl.patch
make CC=gcc
make install prefix=/c/swarm</pre>
'''Summary of patchfile changes:'''
The patchfile is inherited from the SUSE builds of XPM for MinGW and adds Makefiles and other critical components.
One major modification has been made to the SUSE patchfile---<tt>tcl.h</tt> is included in <tt>xpm.h</tt>. This is required in order to use XPM while Tk is installed. Conversely, this means that this build of XPM cannot be used without having Tk installed.
=== LibFFI ===
Starting from the <tt>build</tt> directory, LibFFI can be built and installed as follows:
<pre>tar xzf ../sources/libffi-3.0.9.tar.gz
cd libffi-3.0.9
./configure --prefix=/c/swarm
make
make install</pre>
The LibFFI headers get installed in a weird place.
<pre>mv /c/swarm/lib/libffi-3.0.9/include/*.h /c/swarm/include
rm -rf /c/swarm/lib/libffi-3.0.9</pre>
=== Tcl ===
Starting from the <tt>build</tt> directory, Tcl can be built and installed as follows:
<pre>tar xzf ../sources/tcl8.4.19-src.tar.gz
cd tcl8.4.19
patch -p1 &lt; ../../patches/tcl-8.4.19-fix-lvalues.patch
cd win
./configure --prefix=/c/swarm
make
make install</pre>
'''Summary of patchfile changes:'''
At two places in the TCL source code, an assignment is made while simultaneously performing a typecast. The typecast and the assignment had to be split into separate operations in order to be acceptable to the MinGW compilers.
=== Tk ===
Starting from the <tt>build</tt> directory, Tk can be built and installed as follows:
<pre>tar xzf ../sources/tk8.4.19-src.tar.gz
cd tk8.4.19/win
./configure --prefix=/c/swarm
make
make install</pre>
=== BLT ===
Starting from the <tt>build</tt> directory, BLT can be built and installed as follows:
<pre>tar xzf ../sources/BLT2.4z.tar.gz
cd blt2.4z
./configure --prefix=/c/swarm --without-x
make
make install</pre>
=== HDF5 (Optional) ===
Getting HDF5 to work with MinGW is a little tricky. It is an optional dependency, so if support for reading and writing <tt>.hdf</tt> files is not needed this section can be skipped.
As of version 1.8.7, HDF5 currently does not compile under MinGW. So, we must wrap pre-compiled binaries for use with MinGW. In order to wrap the binaries, we will need an additional tool called <tt>pexports</tt>. This can be installed using <tt>mingw-get</tt>:
<pre>mingw-get install mingw-utils</pre>
Download 32-bit Windows binaries from the HDF website compiled for use with the Visual Studio compilers (these files have &quot;VS&quot; listed under the ''Compilers'' section). After extracting the archive, the HDF5 libraries can be wrapped for use with MinGW by executing the following commands:
<pre>cd path/to/where/HDF5/was/extracted
for dll in `ls dll/*dll`; do
def_file=`basename $dll .dll`.def
lib_file=lib`basename $dll dll.dll`.a
pexports $dll &gt; $def_file
dlltool -d $def_file -l lib/$lib_file
done</pre>
Next, move the libraries and header files needed to use HDF5 from C into <tt>C:\swarm</tt>:
<pre>cp dll/hdf5dll.dll dll/szip.dll /c/swarm/bin
cp include/* /c/swarm/include
cp lib/libhdf5.a /c/swarm/lib</pre>
Finally, a patch must be applied to the HDF header file <tt>H5public.h</tt> so that it doesn't define <tt>ssize_t</tt>---a constant already defined by MinGW. The required patch is contained in the Swarm MinGW source archive:
<pre>cd /path/to/where/swarm/source/was/extracted
patch -p1 -d /c/swarm &lt; patches/hdf5-1.8.7-mingw.patch</pre>
== Build Swarm ==
Finally, the Swarm libraries themselves can be built. From the <tt>build</tt> directory, execute the following
<pre>tar xzf ../sources/swarm-2.4.1.tar.gz
cd swarm-2.4.1
patch -p1 ../../patches/swarm-2.4.1-mingw.patch
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm \
--with-zlibdir=/c/swarm \
--with-pngdir=/c/swarm \
--with-xpmdir=/c/swarm \
--with-ffidir=/c/swarm \
--with-tcl=/c/swarm/lib \
--with-tk=/c/swarm/lib \
--with-bltdir=/c/swarm
cd avcall
gcc -S avcall-i386.c
cd ..
make
make install</pre>
If you wrapped HDF5 up for use with MinGW, add <tt>--with-hdf5dir=/c/swarm</tt> to the list of arguments passed to <tt>configure</tt>.
'''Summary of patchfile changes:'''
<tt>swarm-2.4.1-mingw.patch</tt> modifies the Swarm source code in the following ways:
* <tt>gettimeofday</tt> is no longer defined in the Swarm sources as MinGW includes this function in its standard library.
* Swarm GUI functions are updated to be compatible with LibPNG 1.5.
* The Swarm <tt>configure</tt> script defines <tt>DATADIR</tt> as a preprocessor macro---this conflicts with variables in the GCC Objective-C library. <tt>DATDIR</tt> is <tt>undef</tt>ed in critical parts of the source code.
* The <tt>sleep</tt> function is aliased to <tt>usleep</tt>---which is the name of the MinGW implementation.
* The way in which Makefiles invoke <tt>gperf</tt> is amended so that it actually produces output.
* NULL checks are added to `zstrdup` in src/defobj/internal.m. Some functions in the Swarm library may attempt to call `zstrdup` on a NULL pointer. (This happens if the SWARMHOME environment variable is not set.) Failing to check for this condition can lead to segfaults. `zstrdup` now returns NULL if passed a NULL string or if `alloc` fails to allocate memory for a duplicate.
Full details are contained in the patchfile.
= Tools =
== MinGW ==
'''Homepage:''' http://www.mingw.org
'''Download Area:''' http://sourceforge.net/projects/mingw/files
'''Version Used:''' 20110530
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
[http://www.mingw.org MinGW] is a set of software that aims to provide an environment where software developed on UNIX-like systems can be easily compiled for Windows. Since Swarm is primarily developed on Linux (a UNIX clone), MinGW can ease the task of creating Swarm models that run on Windows.
MinGW is similar to the [http://www.cygwin.org Cygwin] project. The major difference is that MinGW produces executables that depend only on native Windows libraries while Cygwin executables require special compatibility libraries that are part of the Cygwin distribution.
=== Installing MinGW ===
MinGW can be installed by downloading the &quot;Automated MinGW Installer&quot;, which usually has a name like <tt>mingw-get-inst-&lt;date&gt;.exe</tt> where <tt>&lt;date&gt;</tt> is the datestamp for when the installer was packaged. Running this executable will start the installation process. The installer lets you select which optional components to install; make sure all boxes are checked so you '''install all components'''.
[[Image:MinGW_Setup.png|frame|none|alt=Install all available MinGW components]]
The installer downloads all components from the internet. This will take a while, so have a cup of coffee or walk the dog.
See the following section about also installing an optional, more-functional shell window for MinGW.
=== Using MinGW ===
The MinGW compilers are accessible through the &quot;MinGW Shell&quot; which should be located under the MinGW folder in the Start Menu:
[[Image:MinGW_Shell.png|frame|none|alt=Location of MinGW Shell]]
or by running <tt>C:\MinGW\msys\1.0\msys.bat</tt> (if MinGW was installed to its default location).
By default the MinGW shell executes inside of a Windows <tt>cmd.exe</tt> terminal. There are a couple major drawbacks to this:
* You cannot resize the window to full-screen.
* The shell provides limited history scrollback.
MinGW provides a couple of alternative terminals for the MinGW shell which do not have these drawbacks; one of which is called MinTTY. To install MinTTY execute the following in a MinGW shell:
<pre>mingw-get install mintty</pre>
Then the <tt>mintty</tt> command can be used to launch a MinTTY terminal. The MinGW Shell can also be set to launch MinTTY by default by editing the file <tt>C:\MinGW\msys\1.0\msys.bat</tt> and changing the following line (approximately line 58):
<pre>if &quot;x%MSYSCON%&quot; == &quot;xunknown&quot; set MSYSCON=sh.exe</pre>
to:
<pre>if &quot;x%MSYSCON%&quot; == &quot;xunknown&quot; set MSYSCON=mintty.exe</pre>
=== A Note About Paths ===
The MinGW Shell emulates a UNIX <tt>bash</tt> shell and thus uses UNIX-style paths, <tt>/path/to/file</tt>, instead of Windows-style paths, <tt>C:\path\to\file</tt>. One peculiarity of this process is that the shell must deal with the fact that Windows filesystems have multiple roots (<tt>C:</tt>, <tt>D:</tt>, etc.) while a UNIX filesystem only has one root called <tt>/</tt>. The way this is reconciled by the <tt>bash</tt> shell provided with MinGW is that <tt>/c</tt> refers to the root of the <tt>C:</tt> drive, <tt>/d</tt> refers to the root of the <tt>D:</tt> drive and so on and so forth.
The root of the filesystem itself, <tt>/</tt>, also has some caveats. <tt>/</tt> refers to the <tt>mysy</tt> folder, <tt>C:/MinGW/mysys/1.0</tt> in a default installation. <tt>/usr</tt> also refers to the same location. Thus, <tt>/usr/local</tt> and <tt>/local</tt> both refer to <tt>C:/MinGW/mysys/1.0/local</tt>.
=== A Note About MinGW-64 ===
Currently Swarm has been developed and tested against the 32-bit version of MinGW. Hence Swarm models produced this way should run in any version of Windows.
The [MinGW-w64][mingw_65] project produces 64-bit MinGW compilers that can produce 64-bit executables that will only run on 64-bit versions of Windows. These executables benefit from:
* Access to more memory. A 32-bit executable will only be able to allocate ~3 GB of RAM---even if the system has more RAM available.
* Possibly quicker execution speeds due to matching the native architecture of the operating system---however this depends on the types of tasks that the program executes. It has been reported that 64 bit Swarm executables run quicker than 32 bit Swarm executables on Linux.
Currently, no attempt has been made to compile Swarm 2.4.1 with the 64 bit MinGW compilers. If a successful attempt is made, please report it on the [http://www.swarm.org/mailman/listinfo/support Swarm mailing list].
== Emacs ==
'''Homepage:''' http://www.gnu.org/software/emacs
'''Version Used:''' 23.3
'''Download Area:''' http://ftp.gnu.org/gnu/emacs/windows
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GNU Emacs is a text editor that is used by many programmers to edit code. However, Emacs can also be scripted to perform a variety of complicated transformations on text files. The scripts that build the Swarm libraries use Emacs to automate the process of generating some source files. Thus Emacs has to be installed in order to build Swarm from source.
=== Installing Emacs ===
Install Emacs by downloading one of the <tt>emacs-&lt;version
number&gt;-bin-i386.zip</tt> files from the download area. Don't use any of the
files containing <tt>barebin</tt>. After extracting the ZIP archive there will
be an Emacs folder containing a subfolder called <tt>bin</tt>. Add this folder
to your Windows <tt>PATH</tt>. [[#RapidEE|RapidEE]] can help edit the
<tt>PATH</tt> variable.
== GPerf ==
'''Homepage:''' http://www.gnu.org/software/gperf/
'''Download Area:''' http://sourceforge.net/projects/gnuwin32/files/gperf
'''Version Used:''' 3.0.1
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GPerf is a program that produces C code containing hash functions. The scripts
that build the Swarm libraries use GPerf to generate some source code files.
Download <tt>gperf.exe</tt> from the GnuWin32 site on Sourceforge and place it
somewhere on your Windows <tt>PATH</tt>. Again, [[#RapidEE|RapidEE]] can help set the <tt>PATH</tt> variable.
== RapidEE ==
'''Homepage:''' http://www.rapidee.com
'''Version Used:''' 5.0
'''License:''' [http://www.rapidee.com/en/license Freeware]
The Rapid Environment Editor (RapidEE) is a spiffy tool that makes it easy to inspect and alter the value of Windows environment variables, such as the <tt>PATH</tt>. RapidEE may be used to edit &quot;System Variables&quot; which will affect all user accounts or &quot;User Variables&quot; which will affect just the current account. Administrative privileges may be required to edit the System Variables.
[[Image:RapidEE_1.png|frame|none|alt=The different variables RapidEE can edit]]
Right-clicking on the <tt>Path</tt> variable in the System Variables or User Variables will bring up a menu that presents the option to &quot;Add value&quot;:
[[Image:RapidEE_2.png|frame|none|alt=Adding a new value to the PATH]]
Once the new entry has been added, RapidEE must be told to save the changes. Command line shells, such as <tt>cmd.exe</tt>, must be restarted in order for them to notice the changes.
[[Image:RapidEE_3.png|frame|none|alt=Adding and saving a value]]
== Depends ==
'''Homepage:''' http://www.dependencywalker.com/
'''Version Used:''' 2.2
'''License:''' Freeware
Depends is a usefull utility that scans Windows executables and reports information concerning the Dynamic-link Libraries (DLLs) that those executables require in order to run.
= Software Used to Compile Swarm 2.4.1 =
{|
! Name
! Verson Used
! License
! Homepage
! Download Area
|-
| ZLib
| 1.2.5
| [http://www.opensource.org/licenses/Zlib ZLib/PNG License]
| [http://www.zlib.net http://www.zlib.net]
| --
|-
| LibFFI
| 3.0.9
| [http://www.opensource.org/licenses/MIT MIT]
| [http://sourceware.org/libffi http://sourceware.org/libffi]
| --
|-
| LibPNG
| 1.5.4
| [http://www.opensource.org/licenses/Zlib ZLib/PNG]
| [http://www.libpng.org/pub/png/libpng.html http://www.libpng.org/pub/png/libpng.html]
| --
|-
| XPM-NoX
| 4.2.0
| [http://www.opensource.org/licenses/MIT MIT]
| unknown
| [http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32 http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32]
|-
| Tcl
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| Tk
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| BLT
| 2.4z
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://blt.sourceforge.net http://blt.sourceforge.net]
| --
|-
| HDF5
| 1.8.7
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://www.hdfgroup.org/HDF5 http://www.hdfgroup.org/HDF5]
| --
|-
| Swarm
| 2.4.1
| [http://www.opensource.org/licenses/GPL-3.0 GPL]
| [http://www.swarm.org http://www.swarm.org]
| [http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
|}
04d8dfe91267018cc7a0ce085c05791ff95ed2f1
2159
2158
2015-12-02T23:23:55Z
SwarmWikiSysop
5
wikitext
text/x-wiki
= Overview =
This documentation provides information on how to use Swarm on Windows with [http://www.mingw.org MinGW] compilers. The following topics will be covered:
* How to run a Swam model compiled with MinGW on Windows: Once you produce a Swarm model using MinGW (or someone gives one to you), how do you run it on other machines without installing Swarm there?
* How to use MinGW to compile your own Swarm models, either during model development or so you can distribute working models to others. This requires installing MinGW and our binary Swarm libraries.
* How to package a model compiled with MinGW so it can be installed and run by itself on Windows machines.
* How to use MinGW to compile the Swarm libraries, in case you want to build your own Swarm binaries.
Each topic is more difficult than the one before it. However the topics are independent in that it is not necessary to know how to compile the Swarm library in order to run a pre-compiled Swarm model or compile your own model against a pre-compiled version of Swarm.
= Using Swarm Models Compiled with MinGW =
A model that has been compiled using MinGW can be installed and run from a Windows computer without installing MinGW or Swarm. An example code is this build of Heatbugs:
[http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe]
However, running a Swarm model requires some support programs and libraries. These are available as
<tt>swarm-2.4.1-win32.zip</tt>, available here:
[http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip]
Unzipping that file will create a folder called <tt>swarm</tt> which should be moved somewhere that is easy to remember. The rest of this tutorial will assume this Swarm folder has been placed at <tt>C:\swarm</tt>.
Before a Swarm model can be run, the <tt>swarm\bin</tt> folder must be added to the Windows <tt>PATH</tt> so that Heatbugs can find necessary libraries when it runs. The <tt>swarm\bin</tt> folder can be ''temporarily'' added to the path by executing the following in the Windows command line (the command line is accessed using the program <tt>cmd.exe</tt>):
<pre>path=%PATH%;C:\swarm\bin</pre>
However, it is possible to have conflicts if other versions of libraries used by Swarm, such as HDF5, are already installed and in your path. And some Swarm programs require that the environment variable SWARMHOME be defined, which will typically not be true. These problems can be avoided by using the following statements instead of the above path command:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%</pre>
You can alternatively add the Swarm folder to your <tt>PATH</tt> permanently by editing the Windows PATH environment variable. A tool like [[#RapidEE|RapidEE]] makes doing so easy, or you can use use Windows control panel > System > Advanced > Environment Variables to add <tt>swarm\bin</tt> to the PATH system variable.
Once the path has been set to include the <tt>swarm\bin</tt> folder, Swarm models can be started through the Windows command line, or by double-clicking on them from the Windows Explorer.
The Heatbugs model can now be run by changing the directory of the command line to the folder holding <tt>heatbugs.exe</tt> and then executing the program. For example, if <tt>heatbugs.exe</tt> is located in <tt>C:\Users\example_user\Downloads</tt>, then the model may be run as follows:
<pre>cd C:\Users\example_user\Downloads
heatbugs.exe</pre>
(or you can just double-click on <tt>heatbugs.exe</tt> from Windows Explorer, which temporarily opens a Windows command terminal while the model runs.)
[[Image:Running_Heatbugs.png|frame|none|alt=Running the Heatbugs model]]
You can also create a simple Windows batch file that sets SWARMHOME and the path and then executes the model. Create a file called, for example <tt>heatbugs.bat</tt> in the same directory where <tt>heatbugs.exe</tt> is, containing these lines:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%
heatbugs.exe</pre>
Then, just double-clicking on <tt>heatbugs.bat</tt> will start the model.
If you try this and get an error that some .dll file is not found, then the problem is likely that the path is not set correctly to include the swarm\bin folder. If instead the program crashes without an error statement, then the problem is more likely that SWARMHOME needs to be set.
= Installing Swarm and MinGW to compile models =
To compile Swarm models from source using MinGW, the following simple steps need to be taken to set up the build environment:
* [[#MinGW|Install MinGW using instructions here]]. Currently only 32-bit MinGW can be used with Swarm. Install all components of MinGW.
* Download compiled Swarm binaries, archived as [http://ftp.swarm.org/pub/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip swarm-2.4.1-win32.zip]. Unzip the archive and place the extracted folder at <tt>C:\swarm</tt>.
'''NOTE:'''
The archived Swarm binaries '''MUST''' be placed at <tt>C:\swarm</tt> to successfully compile Swarm models. This is because some paths had to be hard-coded by <tt>libtool</tt> during the creation of the binaries.
The final step before you can compile a Swarm model is to set the <tt>SWARMHOME</tt> environment variable so that the "make" program knows where to find the Swarm libraries when compiling your code. There are several ways to do this.
*You can temporarily set SWARMHOME by entering this command in the MinGW shell: <pre>export SWARMHOME=/c/swarm</pre>
*You can edit your Makefile so it starts with: <pre>SWARMHOME=/c/swarm</pre>
*Set SWARMHOME permanently as a Windows environment variable, either by using [[#RapidEE|RapidEE]] or Windows control panel > System > Advanced > Environment Variables to add a new (User or System) variable called SWARMHOME with the value <tt>/c/swarm</tt>.
After MinGW has been installed and the Swarm binaries have been downloaded, Swarm models may be compiled using the MinGW shell. Start up the program MinGW Shell, cd to the directory containing your code and Makefile, and enter the command "Make".
An archive of official Swarm example programs can be downloaded from:
[http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
We will use the &quot;Heatbugs&quot; model as an example of how to compile a Swarm application:
<pre>tar xzf /path/to/downloaded/swarmapps-2.3.0.tar.gz
cd swarmapps-2.3.0/objc/heatbugs
make</pre>
'''VERY IMPORTANT NOTE: MinGW produces two executables called <tt>heatbugs.exe</tt>---one in the <tt>heatbugs</tt> folder and another in the <tt>heatbugs/.libs</tt> folder. You should ignore the executable in the top-level folder, <tt>heatbugs/heatbugs.exe</tt>, as it is merely a compiled wrapper script that executes <tt>heatbugs/.libs/heatbugs.exe</tt>. When distributing compiled models, only use binaries from the <tt>.libs</tt> folder.'''
The resulting executable, <tt>.libs/heatbugs.exe</tt> may be executing by following the steps described above at ''Using Swarm Models Compiled with MinGW''. These steps must include setting the Windows Path to include <tt>C:\swarm\bin</tt>.
= Distributing a Swarm Model for Windows Users =
A major benefit of the MinGW version of Swarm is that models can be distributed for people to use without installing Swarm. A simple way to do this, after the model has been compiled and tested using methods in the previous section, is to create a ZIP archive that contains all the files to run the model.
* Create a directory tree that includes the Swarm binary files. For example, create C:\MySwarmModel and add the Swarm binaries (as described [[Swarm_and_MinGW#Using_Swarm_Models_Compiled_with_MinGW|above]]) to it as a subdirectory tree.
* Create another subdirectory that includes just the compiled model.
* Create a third subdirectory that includes any input files that the model needs and a batch file that sets the path and executes the model.
* Zip the whole tree up for distribution.
The directory tree in the zip file looks like this:
<pre>
C:\MySwarmModel\swarm
\bin
\etc
\include
\lib
\man
\share
\executable\MySwarmModel.exe
\Runfiles\MySwarmModel.bat (and any input files)
</pre>
where the file <tt>MySwarmModel.bat</tt> contains:
<pre>
set SWARMHOME=C:\MySwarmModel\swarm
path=%SWARMHOME%\bin;%PATH%
C:\MySwarmModel\executable\MySwarmModel.exe
</pre>
Then users can run the model just by double-clicking on <tt>MySwarmModel.bat</tt>.
= Building Swarm Using MinGW =
This tutorial provides directions and code for compiling your own Swarm libraries for Windows. It is a bit advanced---some familiarity with compiling software from source in a Linux environment and knowledge of the UNIX command line is assumed.
== Install Required Tools ==
The first step is to download and install tools required for compiling Swarm. These links provide directions:
* [[#MinGW|MinGW]]
* [[#Emacs|Emacs]]
* [[#GPerf|GPerf]]
== Build Support Libraries ==
The next steps are to build and install the libraries that Swarm depends on. A ZIP archive containing all the source code required can be found at:
[http://ftp.swarm.org/pub/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip http://ftp.swarm.org/pub/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip]
This archive contains two subdirectories:
* sources: This folder contains the source code for each component.
* patches: This folder contains patchfiles that modfy source code so that MinGW can compile it.
After downloading and extracting the source code archive, open up a MinGW shell and run the following commands:
<pre>cd /path/to/where/swarm/source/was/extracted
mkdir build</pre>
The following steps will all assume your MinGW shell is operating out of the <tt>build</tt> directory. All compiled software will be installed to <tt>/c/swarm</tt> (The Windows Explorer will see the folder appear at <tt>C:\swarm</tt>).
=== ZLib ===
ZLib will be the first library to be built as it is a common dependency for many of the other software components. From the <tt>build</tt> directory, execute the following to build Zlib:
<pre>tar xzf ../sources/zlib-1.2.5.tar.gz
cd zlib-1.2.5
make -f win32/Makefile.gcc</pre>
And then the following commands to install ZLib to <tt>/c/swarm</tt>:
<pre>mkdir -p /c/swarm/bin
mkdir -p /c/swarm/include
mkdir -p /c/swarm/lib
cp zlib1.dll /c/swarm/bin/
cp zconf.h zlib.h /c/swarm/include/
mv libzdll.a libz.dll.a
cp *.a /c/swarm/lib</pre>
=== LibPNG ===
LibPNG will be built next as its only dependency is ZLib. From the <tt>build</tt> directory, execute the following steps to build and install LibPNG:
<pre>tar xjf ../sources/libpng-1.5.4.tar.bz2
cd libpng-1.5.4
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm --with-zlib-prefix=/c/swarm
make
make install</pre>
=== XPM ===
Starting from the <tt>build</tt> directory, the XPM library can be built and installed as follows:
<pre>tar xjf ../sources/xpm-nox-4.2.0.tar.bz2
cd xpm-nox-4.2.0
patch -p1 &lt; ../../patches/xpm-nox-4.2.0-mingw-tcl.patch
make CC=gcc
make install prefix=/c/swarm</pre>
'''Summary of patchfile changes:'''
The patchfile is inherited from the SUSE builds of XPM for MinGW and adds Makefiles and other critical components.
One major modification has been made to the SUSE patchfile---<tt>tcl.h</tt> is included in <tt>xpm.h</tt>. This is required in order to use XPM while Tk is installed. Conversely, this means that this build of XPM cannot be used without having Tk installed.
=== LibFFI ===
Starting from the <tt>build</tt> directory, LibFFI can be built and installed as follows:
<pre>tar xzf ../sources/libffi-3.0.9.tar.gz
cd libffi-3.0.9
./configure --prefix=/c/swarm
make
make install</pre>
The LibFFI headers get installed in a weird place.
<pre>mv /c/swarm/lib/libffi-3.0.9/include/*.h /c/swarm/include
rm -rf /c/swarm/lib/libffi-3.0.9</pre>
=== Tcl ===
Starting from the <tt>build</tt> directory, Tcl can be built and installed as follows:
<pre>tar xzf ../sources/tcl8.4.19-src.tar.gz
cd tcl8.4.19
patch -p1 &lt; ../../patches/tcl-8.4.19-fix-lvalues.patch
cd win
./configure --prefix=/c/swarm
make
make install</pre>
'''Summary of patchfile changes:'''
At two places in the TCL source code, an assignment is made while simultaneously performing a typecast. The typecast and the assignment had to be split into separate operations in order to be acceptable to the MinGW compilers.
=== Tk ===
Starting from the <tt>build</tt> directory, Tk can be built and installed as follows:
<pre>tar xzf ../sources/tk8.4.19-src.tar.gz
cd tk8.4.19/win
./configure --prefix=/c/swarm
make
make install</pre>
=== BLT ===
Starting from the <tt>build</tt> directory, BLT can be built and installed as follows:
<pre>tar xzf ../sources/BLT2.4z.tar.gz
cd blt2.4z
./configure --prefix=/c/swarm --without-x
make
make install</pre>
=== HDF5 (Optional) ===
Getting HDF5 to work with MinGW is a little tricky. It is an optional dependency, so if support for reading and writing <tt>.hdf</tt> files is not needed this section can be skipped.
As of version 1.8.7, HDF5 currently does not compile under MinGW. So, we must wrap pre-compiled binaries for use with MinGW. In order to wrap the binaries, we will need an additional tool called <tt>pexports</tt>. This can be installed using <tt>mingw-get</tt>:
<pre>mingw-get install mingw-utils</pre>
Download 32-bit Windows binaries from the HDF website compiled for use with the Visual Studio compilers (these files have &quot;VS&quot; listed under the ''Compilers'' section). After extracting the archive, the HDF5 libraries can be wrapped for use with MinGW by executing the following commands:
<pre>cd path/to/where/HDF5/was/extracted
for dll in `ls dll/*dll`; do
def_file=`basename $dll .dll`.def
lib_file=lib`basename $dll dll.dll`.a
pexports $dll &gt; $def_file
dlltool -d $def_file -l lib/$lib_file
done</pre>
Next, move the libraries and header files needed to use HDF5 from C into <tt>C:\swarm</tt>:
<pre>cp dll/hdf5dll.dll dll/szip.dll /c/swarm/bin
cp include/* /c/swarm/include
cp lib/libhdf5.a /c/swarm/lib</pre>
Finally, a patch must be applied to the HDF header file <tt>H5public.h</tt> so that it doesn't define <tt>ssize_t</tt>---a constant already defined by MinGW. The required patch is contained in the Swarm MinGW source archive:
<pre>cd /path/to/where/swarm/source/was/extracted
patch -p1 -d /c/swarm &lt; patches/hdf5-1.8.7-mingw.patch</pre>
== Build Swarm ==
Finally, the Swarm libraries themselves can be built. From the <tt>build</tt> directory, execute the following
<pre>tar xzf ../sources/swarm-2.4.1.tar.gz
cd swarm-2.4.1
patch -p1 ../../patches/swarm-2.4.1-mingw.patch
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm \
--with-zlibdir=/c/swarm \
--with-pngdir=/c/swarm \
--with-xpmdir=/c/swarm \
--with-ffidir=/c/swarm \
--with-tcl=/c/swarm/lib \
--with-tk=/c/swarm/lib \
--with-bltdir=/c/swarm
cd avcall
gcc -S avcall-i386.c
cd ..
make
make install</pre>
If you wrapped HDF5 up for use with MinGW, add <tt>--with-hdf5dir=/c/swarm</tt> to the list of arguments passed to <tt>configure</tt>.
'''Summary of patchfile changes:'''
<tt>swarm-2.4.1-mingw.patch</tt> modifies the Swarm source code in the following ways:
* <tt>gettimeofday</tt> is no longer defined in the Swarm sources as MinGW includes this function in its standard library.
* Swarm GUI functions are updated to be compatible with LibPNG 1.5.
* The Swarm <tt>configure</tt> script defines <tt>DATADIR</tt> as a preprocessor macro---this conflicts with variables in the GCC Objective-C library. <tt>DATDIR</tt> is <tt>undef</tt>ed in critical parts of the source code.
* The <tt>sleep</tt> function is aliased to <tt>usleep</tt>---which is the name of the MinGW implementation.
* The way in which Makefiles invoke <tt>gperf</tt> is amended so that it actually produces output.
* NULL checks are added to `zstrdup` in src/defobj/internal.m. Some functions in the Swarm library may attempt to call `zstrdup` on a NULL pointer. (This happens if the SWARMHOME environment variable is not set.) Failing to check for this condition can lead to segfaults. `zstrdup` now returns NULL if passed a NULL string or if `alloc` fails to allocate memory for a duplicate.
Full details are contained in the patchfile.
= Tools =
== MinGW ==
'''Homepage:''' http://www.mingw.org
'''Download Area:''' http://sourceforge.net/projects/mingw/files
'''Version Used:''' 20110530
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
[http://www.mingw.org MinGW] is a set of software that aims to provide an environment where software developed on UNIX-like systems can be easily compiled for Windows. Since Swarm is primarily developed on Linux (a UNIX clone), MinGW can ease the task of creating Swarm models that run on Windows.
MinGW is similar to the [http://www.cygwin.org Cygwin] project. The major difference is that MinGW produces executables that depend only on native Windows libraries while Cygwin executables require special compatibility libraries that are part of the Cygwin distribution.
=== Installing MinGW ===
MinGW can be installed by downloading the &quot;Automated MinGW Installer&quot;, which usually has a name like <tt>mingw-get-inst-&lt;date&gt;.exe</tt> where <tt>&lt;date&gt;</tt> is the datestamp for when the installer was packaged. Running this executable will start the installation process. The installer lets you select which optional components to install; make sure all boxes are checked so you '''install all components'''.
[[Image:MinGW_Setup.png|frame|none|alt=Install all available MinGW components]]
The installer downloads all components from the internet. This will take a while, so have a cup of coffee or walk the dog.
See the following section about also installing an optional, more-functional shell window for MinGW.
=== Using MinGW ===
The MinGW compilers are accessible through the &quot;MinGW Shell&quot; which should be located under the MinGW folder in the Start Menu:
[[Image:MinGW_Shell.png|frame|none|alt=Location of MinGW Shell]]
or by running <tt>C:\MinGW\msys\1.0\msys.bat</tt> (if MinGW was installed to its default location).
By default the MinGW shell executes inside of a Windows <tt>cmd.exe</tt> terminal. There are a couple major drawbacks to this:
* You cannot resize the window to full-screen.
* The shell provides limited history scrollback.
MinGW provides a couple of alternative terminals for the MinGW shell which do not have these drawbacks; one of which is called MinTTY. To install MinTTY execute the following in a MinGW shell:
<pre>mingw-get install mintty</pre>
Then the <tt>mintty</tt> command can be used to launch a MinTTY terminal. The MinGW Shell can also be set to launch MinTTY by default by editing the file <tt>C:\MinGW\msys\1.0\msys.bat</tt> and changing the following line (approximately line 58):
<pre>if &quot;x%MSYSCON%&quot; == &quot;xunknown&quot; set MSYSCON=sh.exe</pre>
to:
<pre>if &quot;x%MSYSCON%&quot; == &quot;xunknown&quot; set MSYSCON=mintty.exe</pre>
=== A Note About Paths ===
The MinGW Shell emulates a UNIX <tt>bash</tt> shell and thus uses UNIX-style paths, <tt>/path/to/file</tt>, instead of Windows-style paths, <tt>C:\path\to\file</tt>. One peculiarity of this process is that the shell must deal with the fact that Windows filesystems have multiple roots (<tt>C:</tt>, <tt>D:</tt>, etc.) while a UNIX filesystem only has one root called <tt>/</tt>. The way this is reconciled by the <tt>bash</tt> shell provided with MinGW is that <tt>/c</tt> refers to the root of the <tt>C:</tt> drive, <tt>/d</tt> refers to the root of the <tt>D:</tt> drive and so on and so forth.
The root of the filesystem itself, <tt>/</tt>, also has some caveats. <tt>/</tt> refers to the <tt>mysy</tt> folder, <tt>C:/MinGW/mysys/1.0</tt> in a default installation. <tt>/usr</tt> also refers to the same location. Thus, <tt>/usr/local</tt> and <tt>/local</tt> both refer to <tt>C:/MinGW/mysys/1.0/local</tt>.
=== A Note About MinGW-64 ===
Currently Swarm has been developed and tested against the 32-bit version of MinGW. Hence Swarm models produced this way should run in any version of Windows.
The [MinGW-w64][mingw_65] project produces 64-bit MinGW compilers that can produce 64-bit executables that will only run on 64-bit versions of Windows. These executables benefit from:
* Access to more memory. A 32-bit executable will only be able to allocate ~3 GB of RAM---even if the system has more RAM available.
* Possibly quicker execution speeds due to matching the native architecture of the operating system---however this depends on the types of tasks that the program executes. It has been reported that 64 bit Swarm executables run quicker than 32 bit Swarm executables on Linux.
Currently, no attempt has been made to compile Swarm 2.4.1 with the 64 bit MinGW compilers. If a successful attempt is made, please report it on the [http://www.swarm.org/mailman/listinfo/support Swarm mailing list].
== Emacs ==
'''Homepage:''' http://www.gnu.org/software/emacs
'''Version Used:''' 23.3
'''Download Area:''' http://ftp.gnu.org/gnu/emacs/windows
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GNU Emacs is a text editor that is used by many programmers to edit code. However, Emacs can also be scripted to perform a variety of complicated transformations on text files. The scripts that build the Swarm libraries use Emacs to automate the process of generating some source files. Thus Emacs has to be installed in order to build Swarm from source.
=== Installing Emacs ===
Install Emacs by downloading one of the <tt>emacs-&lt;version
number&gt;-bin-i386.zip</tt> files from the download area. Don't use any of the
files containing <tt>barebin</tt>. After extracting the ZIP archive there will
be an Emacs folder containing a subfolder called <tt>bin</tt>. Add this folder
to your Windows <tt>PATH</tt>. [[#RapidEE|RapidEE]] can help edit the
<tt>PATH</tt> variable.
== GPerf ==
'''Homepage:''' http://www.gnu.org/software/gperf/
'''Download Area:''' http://sourceforge.net/projects/gnuwin32/files/gperf
'''Version Used:''' 3.0.1
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GPerf is a program that produces C code containing hash functions. The scripts
that build the Swarm libraries use GPerf to generate some source code files.
Download <tt>gperf.exe</tt> from the GnuWin32 site on Sourceforge and place it
somewhere on your Windows <tt>PATH</tt>. Again, [[#RapidEE|RapidEE]] can help set the <tt>PATH</tt> variable.
== RapidEE ==
'''Homepage:''' http://www.rapidee.com
'''Version Used:''' 5.0
'''License:''' [http://www.rapidee.com/en/license Freeware]
The Rapid Environment Editor (RapidEE) is a spiffy tool that makes it easy to inspect and alter the value of Windows environment variables, such as the <tt>PATH</tt>. RapidEE may be used to edit &quot;System Variables&quot; which will affect all user accounts or &quot;User Variables&quot; which will affect just the current account. Administrative privileges may be required to edit the System Variables.
[[Image:RapidEE_1.png|frame|none|alt=The different variables RapidEE can edit]]
Right-clicking on the <tt>Path</tt> variable in the System Variables or User Variables will bring up a menu that presents the option to &quot;Add value&quot;:
[[Image:RapidEE_2.png|frame|none|alt=Adding a new value to the PATH]]
Once the new entry has been added, RapidEE must be told to save the changes. Command line shells, such as <tt>cmd.exe</tt>, must be restarted in order for them to notice the changes.
[[Image:RapidEE_3.png|frame|none|alt=Adding and saving a value]]
== Depends ==
'''Homepage:''' http://www.dependencywalker.com/
'''Version Used:''' 2.2
'''License:''' Freeware
Depends is a usefull utility that scans Windows executables and reports information concerning the Dynamic-link Libraries (DLLs) that those executables require in order to run.
= Software Used to Compile Swarm 2.4.1 =
{|
! Name
! Verson Used
! License
! Homepage
! Download Area
|-
| ZLib
| 1.2.5
| [http://www.opensource.org/licenses/Zlib ZLib/PNG License]
| [http://www.zlib.net http://www.zlib.net]
| --
|-
| LibFFI
| 3.0.9
| [http://www.opensource.org/licenses/MIT MIT]
| [http://sourceware.org/libffi http://sourceware.org/libffi]
| --
|-
| LibPNG
| 1.5.4
| [http://www.opensource.org/licenses/Zlib ZLib/PNG]
| [http://www.libpng.org/pub/png/libpng.html http://www.libpng.org/pub/png/libpng.html]
| --
|-
| XPM-NoX
| 4.2.0
| [http://www.opensource.org/licenses/MIT MIT]
| unknown
| [http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32 http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32]
|-
| Tcl
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| Tk
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| BLT
| 2.4z
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://blt.sourceforge.net http://blt.sourceforge.net]
| --
|-
| HDF5
| 1.8.7
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://www.hdfgroup.org/HDF5 http://www.hdfgroup.org/HDF5]
| --
|-
| Swarm
| 2.4.1
| [http://www.opensource.org/licenses/GPL-3.0 GPL]
| [http://www.swarm.org http://www.swarm.org]
| [http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
|}
f0b1e7b0a3b778d63f7a8649bb38517c83a0a175
2158
2157
2015-12-02T23:07:32Z
SwarmWikiSysop
5
wikitext
text/x-wiki
= Overview =
This documentation provides information on how to use Swarm on Windows with [http://www.mingw.org MinGW] compilers. The following topics will be covered:
* How to run a Swam model compiled with MinGW on Windows: Once you produce a Swarm model using MinGW (or someone gives one to you), how do you run it on other machines without installing Swarm there?
* How to use MinGW to compile your own Swarm models, either during model development or so you can distribute working models to others. This requires installing MinGW and our binary Swarm libraries.
* How to package a model compiled with MinGW so it can be installed and run by itself on Windows machines.
* How to use MinGW to compile the Swarm libraries, in case you want to build your own Swarm binaries.
Each topic is more difficult than the one before it. However the topics are independent in that it is not necessary to know how to compile the Swarm library in order to run a pre-compiled Swarm model or compile your own model against a pre-compiled version of Swarm.
= Using Swarm Models Compiled with MinGW =
A model that has been compiled using MinGW can be installed and run from a Windows computer without installing MinGW or Swarm. An example code is this build of Heatbugs:
[http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe]
However, running a Swarm model requires some support programs and libraries. These are available as
<tt>swarm-2.4.1-win32.zip</tt>, available here:
[http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip]
Unzipping that file will create a folder called <tt>swarm</tt> which should be moved somewhere that is easy to remember. The rest of this tutorial will assume this Swarm folder has been placed at <tt>C:\swarm</tt>.
Before a Swarm model can be run, the <tt>swarm\bin</tt> folder must be added to the Windows <tt>PATH</tt> so that Heatbugs can find necessary libraries when it runs. The <tt>swarm\bin</tt> folder can be ''temporarily'' added to the path by executing the following in the Windows command line (the command line is accessed using the program <tt>cmd.exe</tt>):
<pre>path=%PATH%;C:\swarm\bin</pre>
However, it is possible to have conflicts if other versions of libraries used by Swarm, such as HDF5, are already installed and in your path. And some Swarm programs require that the environment variable SWARMHOME be defined, which will typically not be true. These problems can be avoided by using the following statements instead of the above path command:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%</pre>
You can alternatively add the Swarm folder to your <tt>PATH</tt> permanently by editing the Windows PATH environment variable. A tool like [[#RapidEE|RapidEE]] makes doing so easy, or you can use use Windows control panel > System > Advanced > Environment Variables to add <tt>swarm\bin</tt> to the PATH system variable.
Once the path has been set to include the <tt>swarm\bin</tt> folder, Swarm models can be started through the Windows command line, or by double-clicking on them from the Windows Explorer.
The Heatbugs model can now be run by changing the directory of the command line to the folder holding <tt>heatbugs.exe</tt> and then executing the program. For example, if <tt>heatbugs.exe</tt> is located in <tt>C:\Users\example_user\Downloads</tt>, then the model may be run as follows:
<pre>cd C:\Users\example_user\Downloads
heatbugs.exe</pre>
(or you can just double-click on <tt>heatbugs.exe</tt> from Windows Explorer, which temporarily opens a Windows command terminal while the model runs.)
[[Image:Running_Heatbugs.png|frame|none|alt=Running the Heatbugs model]]
You can also create a simple Windows batch file that sets SWARMHOME and the path and then executes the model. Create a file called, for example <tt>heatbugs.bat</tt> in the same directory where <tt>heatbugs.exe</tt> is, containing these lines:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%
heatbugs.exe</pre>
Then, just double-clicking on <tt>heatbugs.bat</tt> will start the model.
If you try this and get an error that some .dll file is not found, then the problem is likely that the path is not set correctly to include the swarm\bin folder. If instead the program crashes without an error statement, then the problem is more likely that SWARMHOME needs to be set.
= Installing Swarm and MinGW to compile models =
To compile Swarm models from source using MinGW, the following simple steps need to be taken to set up the build environment:
* [[#MinGW|Install MinGW using instructions here]]. Currently only 32-bit MinGW can be used with Swarm. Install all components of MinGW.
* Download compiled Swarm binaries, archived as [http://ftp.swarm.org/pub/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip swarm-2.4.1-win32.zip]. Unzip the archive and place the extracted folder at <tt>C:\swarm</tt>.
'''NOTE:'''
The archived Swarm binaries '''MUST''' be placed at <tt>C:\swarm</tt> to successfully compile Swarm models. This is because some paths had to be hard-coded by <tt>libtool</tt> during the creation of the binaries.
The final step before you can compile a Swarm model is to set the <tt>SWARMHOME</tt> environment variable so that the "make" program knows where to find the Swarm libraries when compiling your code. There are several ways to do this.
*You can temporarily set SWARMHOME by entering this command in the MinGW shell: <pre>export SWARMHOME=/c/swarm</pre>
*You can edit your Makefile so it starts with: <pre>SWARMHOME=/c/swarm</pre>
*Set SWARMHOME permanently as a Windows environment variable, either by using [[#RapidEE|RapidEE]] or Windows control panel > System > Advanced > Environment Variables to add a new (User or System) variable called SWARMHOME with the value <tt>/c/swarm</tt>.
After MinGW has been installed and the Swarm binaries have been downloaded, Swarm models may be compiled using the MinGW shell. Start up the program MinGW Shell, cd to the directory containing your code and Makefile, and enter the command "Make".
An archive of official Swarm example programs can be downloaded from:
[http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
We will use the &quot;Heatbugs&quot; model as an example of how to compile a Swarm application:
<pre>tar xzf /path/to/downloaded/swarmapps-2.3.0.tar.gz
cd swarmapps-2.3.0/objc/heatbugs
make</pre>
'''VERY IMPORTANT NOTE: MinGW produces two executables called <tt>heatbugs.exe</tt>---one in the <tt>heatbugs</tt> folder and another in the <tt>heatbugs/.libs</tt> folder. You should ignore the executable in the top-level folder, <tt>heatbugs/heatbugs.exe</tt>, as it is merely a compiled wrapper script that executes <tt>heatbugs/.libs/heatbugs.exe</tt>. When distributing compiled models, only use binaries from the <tt>.libs</tt> folder.'''
The resulting executable, <tt>.libs/heatbugs.exe</tt> may be executing by following the steps described above at ''Using Swarm Models Compiled with MinGW''. These steps must include setting the Windows Path to include <tt>C:\swarm\bin</tt>.
= Distributing a Swarm Model for Windows Users =
A major benefit of the MinGW version of Swarm is that models can be distributed for people to use without installing Swarm. A simple way to do this, after the model has been compiled and tested using methods in the previous section, is to create a ZIP archive that contains all the files to run the model.
* Create a directory tree that includes the Swarm binary files. For example, create C:\MySwarmModel and add the Swarm binaries (as described [[Swarm_and_MinGW#Using_Swarm_Models_Compiled_with_MinGW|above]]) to it as a subdirectory tree.
* Create another subdirectory that includes just the compiled model.
* Create a third subdirectory that includes any input files that the model needs and a batch file that sets the path and executes the model.
* Zip the whole tree up for distribution.
The directory tree in the zip file looks like this:
<pre>
C:\MySwarmModel\swarm
\bin
\etc
\include
\lib
\man
\share
\executable\MySwarmModel.exe
\Runfiles\MySwarmModel.bat (and any input files)
</pre>
where the file <tt>MySwarmModel.bat</tt> contains:
<pre>
set SWARMHOME=C:\MySwarmModel\swarm
path=%SWARMHOME%\bin;%PATH%
C:\MySwarmModel\executable\MySwarmModel.exe
</pre>
Then users can run the model just by double-clicking on <tt>MySwarmModel.bat</tt>.
= Building Swarm Using MinGW =
This tutorial provides directions and code for compiling your own Swarm libraries for Windows. It is a bit advanced---some familiarity with compiling software from source in a Linux environment and knowledge of the UNIX command line is assumed.
== Install Required Tools ==
The first step is to download and install tools required for compiling Swarm. These links provide directions:
* [[#MinGW|MinGW]]
* [[#Emacs|Emacs]]
* [[#GPerf|GPerf]]
== Build Support Libraries ==
The next steps are to build and install the libraries that Swarm depends on. A ZIP archive containing all the source code required can be found at:
[http://ftp.swarm.org/pub/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip http://ftp.swarm.org/pub/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip]
This archive contains two subdirectories:
* sources: This folder contains the source code for each component.
* patches: This folder contains patchfiles that modfy source code so that MinGW can compile it.
After downloading and extracting the source code archive, open up a MinGW shell and run the following commands:
<pre>cd /path/to/where/swarm/source/was/extracted
mkdir build</pre>
The following steps will all assume your MinGW shell is operating out of the <tt>build</tt> directory. All compiled software will be installed to <tt>/c/swarm</tt> (The Windows Explorer will see the folder appear at <tt>C:\swarm</tt>).
=== ZLib ===
ZLib will be the first library to be built as it is a common dependency for many of the other software components. From the <tt>build</tt> directory, execute the following to build Zlib:
<pre>tar xzf ../sources/zlib-1.2.5.tar.gz
cd zlib-1.2.5
make -f win32/Makefile.gcc</pre>
And then the following commands to install ZLib to <tt>/c/swarm</tt>:
<pre>mkdir -p /c/swarm/bin
mkdir -p /c/swarm/include
mkdir -p /c/swarm/lib
cp zlib1.dll /c/swarm/bin/
cp zconf.h zlib.h /c/swarm/include/
mv libzdll.a libz.dll.a
cp *.a /c/swarm/lib</pre>
=== LibPNG ===
LibPNG will be built next as its only dependency is ZLib. From the <tt>build</tt> directory, execute the following steps to build and install LibPNG:
<pre>tar xjf ../sources/libpng-1.5.4.tar.bz2
cd libpng-1.5.4
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm --with-zlib-prefix=/c/swarm
make
make install</pre>
=== XPM ===
Starting from the <tt>build</tt> directory, the XPM library can be built and installed as follows:
<pre>tar xjf ../sources/xpm-nox-4.2.0.tar.bz2
cd xpm-nox-4.2.0
patch -p1 &lt; ../../patches/xpm-nox-4.2.0-mingw-tcl.patch
make CC=gcc
make install prefix=/c/swarm</pre>
'''Summary of patchfile changes:'''
The patchfile is inherited from the SUSE builds of XPM for MinGW and adds Makefiles and other critical components.
One major modification has been made to the SUSE patchfile---<tt>tcl.h</tt> is included in <tt>xpm.h</tt>. This is required in order to use XPM while Tk is installed. Conversely, this means that this build of XPM cannot be used without having Tk installed.
=== LibFFI ===
Starting from the <tt>build</tt> directory, LibFFI can be built and installed as follows:
<pre>tar xzf ../sources/libffi-3.0.9.tar.gz
cd libffi-3.0.9
./configure --prefix=/c/swarm
make
make install</pre>
The LibFFI headers get installed in a weird place.
<pre>mv /c/swarm/lib/libffi-3.0.9/include/*.h /c/swarm/include
rm -rf /c/swarm/lib/libffi-3.0.9</pre>
=== Tcl ===
Starting from the <tt>build</tt> directory, Tcl can be built and installed as follows:
<pre>tar xzf ../sources/tcl8.4.19-src.tar.gz
cd tcl8.4.19
patch -p1 &lt; ../../patches/tcl-8.4.19-fix-lvalues.patch
cd win
./configure --prefix=/c/swarm
make
make install</pre>
'''Summary of patchfile changes:'''
At two places in the TCL source code, an assignment is made while simultaneously performing a typecast. The typecast and the assignment had to be split into separate operations in order to be acceptable to the MinGW compilers.
=== Tk ===
Starting from the <tt>build</tt> directory, Tk can be built and installed as follows:
<pre>tar xzf ../sources/tk8.4.19-src.tar.gz
cd tk8.4.19/win
./configure --prefix=/c/swarm
make
make install</pre>
=== BLT ===
Starting from the <tt>build</tt> directory, BLT can be built and installed as follows:
<pre>tar xzf ../sources/BLT2.4z.tar.gz
cd blt2.4z
./configure --prefix=/c/swarm --without-x
make
make install</pre>
=== HDF5 (Optional) ===
Getting HDF5 to work with MinGW is a little tricky. It is an optional dependency, so if support for reading and writing <tt>.hdf</tt> files is not needed this section can be skipped.
As of version 1.8.7, HDF5 currently does not compile under MinGW. So, we must wrap pre-compiled binaries for use with MinGW. In order to wrap the binaries, we will need an additional tool called <tt>pexports</tt>. This can be installed using <tt>mingw-get</tt>:
<pre>mingw-get install mingw-utils</pre>
Download 32-bit Windows binaries from the HDF website compiled for use with the Visual Studio compilers (these files have &quot;VS&quot; listed under the ''Compilers'' section). After extracting the archive, the HDF5 libraries can be wrapped for use with MinGW by executing the following commands:
<pre>cd path/to/where/HDF5/was/extracted
for dll in `ls dll/*dll`; do
def_file=`basename $dll .dll`.def
lib_file=lib`basename $dll dll.dll`.a
pexports $dll &gt; $def_file
dlltool -d $def_file -l lib/$lib_file
done</pre>
Next, move the libraries and header files needed to use HDF5 from C into <tt>C:\swarm</tt>:
<pre>cp dll/hdf5dll.dll dll/szip.dll /c/swarm/bin
cp include/* /c/swarm/include
cp lib/libhdf5.a /c/swarm/lib</pre>
Finally, a patch must be applied to the HDF header file <tt>H5public.h</tt> so that it doesn't define <tt>ssize_t</tt>---a constant already defined by MinGW. The required patch is contained in the Swarm MinGW source archive:
<pre>cd /path/to/where/swarm/source/was/extracted
patch -p1 -d /c/swarm &lt; patches/hdf5-1.8.7-mingw.patch</pre>
== Build Swarm ==
Finally, the Swarm libraries themselves can be built. From the <tt>build</tt> directory, execute the following
<pre>tar xzf ../sources/swarm-2.4.1.tar.gz
cd swarm-2.4.1
patch -p1 ../../patches/swarm-2.4.1-mingw.patch
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm \
--with-zlibdir=/c/swarm \
--with-pngdir=/c/swarm \
--with-xpmdir=/c/swarm \
--with-ffidir=/c/swarm \
--with-tcl=/c/swarm/lib \
--with-tk=/c/swarm/lib \
--with-bltdir=/c/swarm
cd avcall
gcc -S avcall-i386.c
cd ..
make
make install</pre>
If you wrapped HDF5 up for use with MinGW, add <tt>--with-hdf5dir=/c/swarm</tt> to the list of arguments passed to <tt>configure</tt>.
'''Summary of patchfile changes:'''
<tt>swarm-2.4.1-mingw.patch</tt> modifies the Swarm source code in the following ways:
* <tt>gettimeofday</tt> is no longer defined in the Swarm sources as MinGW includes this function in its standard library.
* Swarm GUI functions are updated to be compatible with LibPNG 1.5.
* The Swarm <tt>configure</tt> script defines <tt>DATADIR</tt> as a preprocessor macro---this conflicts with variables in the GCC Objective-C library. <tt>DATDIR</tt> is <tt>undef</tt>ed in critical parts of the source code.
* The <tt>sleep</tt> function is aliased to <tt>usleep</tt>---which is the name of the MinGW implementation.
* The way in which Makefiles invoke <tt>gperf</tt> is amended so that it actually produces output.
* NULL checks are added to `zstrdup` in src/defobj/internal.m. Some functions in the Swarm library may attempt to call `zstrdup` on a NULL pointer. (This happens if the SWARMHOME environment variable is not set.) Failing to check for this condition can lead to segfaults. `zstrdup` now returns NULL if passed a NULL string or if `alloc` fails to allocate memory for a duplicate.
Full details are contained in the patchfile.
= Tools =
== MinGW ==
'''Homepage:''' http://www.mingw.org
'''Download Area:''' http://sourceforge.net/projects/mingw/files
'''Version Used:''' 20110530
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
[http://www.mingw.org MinGW] is a set of software that aims to provide an environment where software developed on UNIX-like systems can be easily compiled for Windows. Since Swarm is primarily developed on Linux (a UNIX clone), MinGW can ease the task of creating Swarm models that run on Windows.
MinGW is similar to the [http://www.cygwin.org Cygwin] project. The major difference is that MinGW produces executables that depend only on native Windows libraries while Cygwin executables require special compatibility libraries that are part of the Cygwin distribution.
=== Installing MinGW ===
MinGW can be installed by downloading the &quot;Automated MinGW Installer&quot;, which usually has a name like <tt>mingw-get-inst-&lt;date&gt;.exe</tt> where <tt>&lt;date&gt;</tt> is the datestamp for when the installer was packaged. Running this executable will start the installation process. The installer lets you select which optional components to install; make sure all boxes are checked so you '''install all components'''.
[[Image:MinGW_Setup.png|frame|none|alt=Install all available MinGW components]]
The installer downloads all components from the internet. This will take a while, so have a cup of coffee or walk the dog.
See the following section about also installing an optional, more-functional shell window for MinGW.
=== Using MinGW ===
The MinGW compilers are accessible through the &quot;MinGW Shell&quot; which should be located under the MinGW folder in the Start Menu:
[[Image:MinGW_Shell.png|frame|none|alt=Location of MinGW Shell]]
or by running <tt>C:\MinGW\msys\1.0\msys.bat</tt> (if MinGW was installed to its default location).
By default the MinGW shell executes inside of a Windows <tt>cmd.exe</tt> terminal. There are a couple major drawbacks to this:
* You cannot resize the window to full-screen.
* The shell provides limited history scrollback.
MinGW provides a couple of alternative terminals for the MinGW shell which do not have these drawbacks; one of which is called MinTTY. To install MinTTY execute the following in a MinGW shell:
<pre>mingw-get install mintty</pre>
Then the <tt>mintty</tt> command can be used to launch a MinTTY terminal. The MinGW Shell can also be set to launch MinTTY by default by editing the file <tt>C:\MinGW\msys\1.0\msys.bat</tt> and changing the following line (approximately line 58):
<pre>if &quot;x%MSYSCON%&quot; == &quot;xunknown&quot; set MSYSCON=sh.exe</pre>
to:
<pre>if &quot;x%MSYSCON%&quot; == &quot;xunknown&quot; set MSYSCON=mintty.exe</pre>
=== A Note About Paths ===
The MinGW Shell emulates a UNIX <tt>bash</tt> shell and thus uses UNIX-style paths, <tt>/path/to/file</tt>, instead of Windows-style paths, <tt>C:\path\to\file</tt>. One peculiarity of this process is that the shell must deal with the fact that Windows filesystems have multiple roots (<tt>C:</tt>, <tt>D:</tt>, etc.) while a UNIX filesystem only has one root called <tt>/</tt>. The way this is reconciled by the <tt>bash</tt> shell provided with MinGW is that <tt>/c</tt> refers to the root of the <tt>C:</tt> drive, <tt>/d</tt> refers to the root of the <tt>D:</tt> drive and so on and so forth.
The root of the filesystem itself, <tt>/</tt>, also has some caveats. <tt>/</tt> refers to the <tt>mysy</tt> folder, <tt>C:/MinGW/mysys/1.0</tt> in a default installation. <tt>/usr</tt> also refers to the same location. Thus, <tt>/usr/local</tt> and <tt>/local</tt> both refer to <tt>C:/MinGW/mysys/1.0/local</tt>.
=== A Note About MinGW-64 ===
Currently Swarm has been developed and tested against the 32-bit version of MinGW. Hence Swarm models produced this way should run in any version of Windows.
The [MinGW-w64][mingw_65] project produces 64-bit MinGW compilers that can produce 64-bit executables that will only run on 64-bit versions of Windows. These executables benefit from:
* Access to more memory. A 32-bit executable will only be able to allocate ~3 GB of RAM---even if the system has more RAM available.
* Possibly quicker execution speeds due to matching the native architecture of the operating system---however this depends on the types of tasks that the program executes. It has been reported that 64 bit Swarm executables run quicker than 32 bit Swarm executables on Linux.
Currently, no attempt has been made to compile Swarm 2.4.1 with the 64 bit MinGW compilers. If a successful attempt is made, please report it on the [http://www.swarm.org/mailman/listinfo/support Swarm mailing list].
== Emacs ==
'''Homepage:''' http://www.gnu.org/software/emacs
'''Version Used:''' 23.3
'''Download Area:''' http://ftp.gnu.org/gnu/emacs/windows
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GNU Emacs is a text editor that is used by many programmers to edit code. However, Emacs can also be scripted to perform a variety of complicated transformations on text files. The scripts that build the Swarm libraries use Emacs to automate the process of generating some source files. Thus Emacs has to be installed in order to build Swarm from source.
=== Installing Emacs ===
Install Emacs by downloading one of the <tt>emacs-&lt;version
number&gt;-bin-i386.zip</tt> files from the download area. Don't use any of the
files containing <tt>barebin</tt>. After extracting the ZIP archive there will
be an Emacs folder containing a subfolder called <tt>bin</tt>. Add this folder
to your Windows <tt>PATH</tt>. [[#RapidEE|RapidEE]] can help edit the
<tt>PATH</tt> variable.
== GPerf ==
'''Homepage:''' http://www.gnu.org/software/gperf/
'''Download Area:''' http://sourceforge.net/projects/gnuwin32/files/gperf
'''Version Used:''' 3.0.1
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GPerf is a program that produces C code containing hash functions. The scripts
that build the Swarm libraries use GPerf to generate some source code files.
Download <tt>gperf.exe</tt> from the GnuWin32 site on Sourceforge and place it
somewhere on your Windows <tt>PATH</tt>. Again, [[#RapidEE|RapidEE]] can help set the <tt>PATH</tt> variable.
== RapidEE ==
'''Homepage:''' http://www.rapidee.com
'''Version Used:''' 5.0
'''License:''' [http://www.rapidee.com/en/license Freeware]
The Rapid Environment Editor (RapidEE) is a spiffy tool that makes it easy to inspect and alter the value of Windows environment variables, such as the <tt>PATH</tt>. RapidEE may be used to edit &quot;System Variables&quot; which will affect all user accounts or &quot;User Variables&quot; which will affect just the current account. Administrative privileges may be required to edit the System Variables.
[[Image:RapidEE_1.png|frame|none|alt=The different variables RapidEE can edit]]
Right-clicking on the <tt>Path</tt> variable in the System Variables or User Variables will bring up a menu that presents the option to &quot;Add value&quot;:
[[Image:RapidEE_2.png|frame|none|alt=Adding a new value to the PATH]]
Once the new entry has been added, RapidEE must be told to save the changes. Command line shells, such as <tt>cmd.exe</tt>, must be restarted in order for them to notice the changes.
[[Image:RapidEE_3.png|frame|none|alt=Adding and saving a value]]
== Depends ==
'''Homepage:''' http://www.dependencywalker.com/
'''Version Used:''' 2.2
'''License:''' Freeware
Depends is a usefull utility that scans Windows executables and reports information concerning the Dynamic-link Libraries (DLLs) that those executables require in order to run.
= Software Used to Compile Swarm 2.4.1 =
{|
! Name
! Verson Used
! License
! Homepage
! Download Area
|-
| ZLib
| 1.2.5
| [http://www.opensource.org/licenses/Zlib ZLib/PNG License]
| [http://www.zlib.net http://www.zlib.net]
| --
|-
| LibFFI
| 3.0.9
| [http://www.opensource.org/licenses/MIT MIT]
| [http://sourceware.org/libffi http://sourceware.org/libffi]
| --
|-
| LibPNG
| 1.5.4
| [http://www.opensource.org/licenses/Zlib ZLib/PNG]
| [http://www.libpng.org/pub/png/libpng.html http://www.libpng.org/pub/png/libpng.html]
| --
|-
| XPM-NoX
| 4.2.0
| [http://www.opensource.org/licenses/MIT MIT]
| unknown
| [http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32 http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32]
|-
| Tcl
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| Tk
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| BLT
| 2.4z
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://blt.sourceforge.net http://blt.sourceforge.net]
| --
|-
| HDF5
| 1.8.7
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://www.hdfgroup.org/HDF5 http://www.hdfgroup.org/HDF5]
| --
|-
| Swarm
| 2.4.1
| [http://www.opensource.org/licenses/GPL-3.0 GPL]
| [http://www.swarm.org http://www.swarm.org]
| [http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
|}
1da321fe7b1b9c3726a8f5f513e15bf38899540d
2157
2156
2015-12-02T22:57:16Z
SwarmWikiSysop
5
/* Using Swarm Models Compiled with MinGW */
wikitext
text/x-wiki
= Overview =
This documentation provides information on how to use Swarm on Windows with [http://www.mingw.org MinGW] compilers. The following topics will be covered:
* How to run a Swam model compiled with MinGW on Windows: Once you produce a Swarm model using MinGW (or someone gives one to you), how do you run it on other machines without installing Swarm there?
* How to use MinGW to compile your own Swarm models, either during model development or so you can distribute working models to others. This requires installing MinGW and our binary Swarm libraries.
* How to package a model compiled with MinGW so it can be installed and run by itself on Windows machines.
* How to use MinGW to compile the Swarm libraries, in case you want to build your own Swarm binaries.
Each topic is more difficult than the one before it. However the topics are independent in that it is not necessary to know how to compile the Swarm library in order to run a pre-compiled Swarm model or compile your own model against a pre-compiled version of Swarm.
= Using Swarm Models Compiled with MinGW =
A model that has been compiled using MinGW can be installed and run from a Windows computer without installing MinGW or Swarm. An example code is this build of Heatbugs:
[http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe]
However, running a Swarm model requires some support programs and libraries. These are available as
<tt>swarm-2.4.1-win32.zip</tt>, available here:
[http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip]
Unzipping that file will create a folder called <tt>swarm</tt> which should be moved somewhere that is easy to remember. The rest of this tutorial will assume this Swarm folder has been placed at <tt>C:\swarm</tt>.
Before a Swarm model can be run, the <tt>swarm\bin</tt> folder must be added to the Windows <tt>PATH</tt> so that Heatbugs can find necessary libraries when it runs. The <tt>swarm\bin</tt> folder can be ''temporarily'' added to the path by executing the following in the Windows command line (the command line is accessed using the program <tt>cmd.exe</tt>):
<pre>path=%PATH%;C:\swarm\bin</pre>
However, it is possible to have conflicts if other versions of libraries used by Swarm, such as HDF5, are already installed and in your path. And some Swarm programs require that the environment variable SWARMHOME be defined, which will typically not be true. These problems can be avoided by using the following statements instead of the above path command:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%</pre>
You can alternatively add the Swarm folder to your <tt>PATH</tt> permanently by editing the Windows PATH environment variable. A tool like [[#RapidEE|RapidEE]] makes doing so easy, or you can use use Windows control panel > System > Advanced > Environment Variables to add <tt>swarm\bin</tt> to the PATH system variable.
Once the path has been set to include the <tt>swarm\bin</tt> folder, Swarm models can be started through the Windows command line, or by double-clicking on them from the Windows Explorer.
The Heatbugs model can now be run by changing the directory of the command line to the folder holding <tt>heatbugs.exe</tt> and then executing the program. For example, if <tt>heatbugs.exe</tt> is located in <tt>C:\Users\example_user\Downloads</tt>, then the model may be run as follows:
<pre>cd C:\Users\example_user\Downloads
heatbugs.exe</pre>
(or you can just double-click on <tt>heatbugs.exe</tt> from Windows Explorer, which temporarily opens a Windows command terminal while the model runs.)
[[Image:Running_Heatbugs.png|frame|none|alt=Running the Heatbugs model]]
You can also create a simple Windows batch file that sets SWARMHOME and the path and then executes the model. Create a file called, for example <tt>heatbugs.bat</tt> in the same directory where <tt>heatbugs.exe</tt> is, containing these lines:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%
heatbugs.exe</pre>
Then, just double-clicking on <tt>heatbugs.bat</tt> will start the model.
If you try this and get an error that some .dll file is not found, then the problem is likely that the path is not set correctly to include the swarm\bin folder. If instead the program crashes without an error statement, then the problem is more likely that SWARMHOME needs to be set.
= Installing Swarm and MinGW to compile models =
To compile Swarm models from source using MinGW, the following simple steps need to be taken to set up the build environment:
* [[#MinGW|Install MinGW using instructions here]]. Currently only 32-bit MinGW can be used with Swarm. Install all components of MinGW.
* Download compiled Swarm binaries, archived as [http://ftp.swarm.org/pub/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip swarm-2.4.1-win32.zip]. Unzip the archive and place the extracted folder at <tt>C:\swarm</tt>.
'''NOTE:'''
The archived Swarm binaries '''MUST''' be placed at <tt>C:\swarm</tt> to successfully compile Swarm models. This is because some paths had to be hard-coded by <tt>libtool</tt> during the creation of the binaries.
The final step before you can compile a Swarm model is to set the <tt>SWARMHOME</tt> environment variable so that the "make" program knows where to find the Swarm libraries when compiling your code. There are several ways to do this.
*You can temporarily set SWARMHOME by entering this command in the MinGW shell: <pre>export SWARMHOME=/c/swarm</pre>
*You can edit your Makefile so it starts with: <pre>SWARMHOME=/c/swarm</pre>
*Set SWARMHOME permanently as a Windows environment variable, either by using [[#RapidEE|RapidEE]] or Windows control panel > System > Advanced > Environment Variables to add a new (User or System) variable called SWARMHOME with the value <tt>/c/swarm</tt>.
After MinGW has been installed and the Swarm binaries have been downloaded, Swarm models may be compiled using the MinGW shell. Start up the program MinGW Shell, cd to the directory containing your code and Makefile, and enter the command "Make".
An archive of official Swarm example programs can be downloaded from:
[http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
We will use the &quot;Heatbugs&quot; model as an example of how to compile a Swarm application:
<pre>tar xzf /path/to/downloaded/swarmapps-2.3.0.tar.gz
cd swarmapps-2.3.0/objc/heatbugs
make</pre>
'''VERY IMPORTANT NOTE: MinGW produces two executables called <tt>heatbugs.exe</tt>---one in the <tt>heatbugs</tt> folder and another in the <tt>heatbugs/.libs</tt> folder. You should ignore the executable in the top-level folder, <tt>heatbugs/heatbugs.exe</tt>, as it is merely a compiled wrapper script that executes <tt>heatbugs/.libs/heatbugs.exe</tt>. When distributing compiled models, only use binaries from the <tt>.libs</tt> folder.'''
The resulting executable, <tt>.libs/heatbugs.exe</tt> may be executing by following the steps described above at ''Using Swarm Models Compiled with MinGW''. These steps must include setting the Windows Path to include <tt>C:\swarm\bin</tt>.
= Distributing a Swarm Model for Windows Users =
A major benefit of the MinGW version of Swarm is that models can be distributed for people to use without installing Swarm. A simple way to do this, after the model has been compiled and tested using methods in the previous section, is to create a ZIP archive that contains all the files to run the model.
* Create a directory tree that includes the Swarm binary files. For example, create C:\MySwarmModel and add the Swarm binaries (as described [[Swarm_and_MinGW#Using_Swarm_Models_Compiled_with_MinGW|above]]) to it as a subdirectory tree.
* Create another subdirectory that includes just the compiled model.
* Create a third subdirectory that includes any input files that the model needs and a batch file that sets the path and executes the model.
* Zip the whole tree up for distribution.
The directory tree in the zip file looks like this:
<pre>
C:\MySwarmModel\swarm
\bin
\etc
\include
\lib
\man
\share
\executable\MySwarmModel.exe
\Runfiles\MySwarmModel.bat (and any input files)
</pre>
where the file <tt>MySwarmModel.bat</tt> contains:
<pre>
set SWARMHOME=C:\MySwarmModel\swarm
path=%SWARMHOME%\bin;%PATH%
C:\MySwarmModel\executable\MySwarmModel.exe
</pre>
Then users can run the model just by double-clicking on <tt>MySwarmModel.bat</tt>.
= Building Swarm Using MinGW =
This tutorial provides directions and code for compiling your own Swarm libraries for Windows. It is a bit advanced---some familiarity with compiling software from source in a Linux environment and knowledge of the UNIX command line is assumed.
== Install Required Tools ==
The first step is to download and install tools required for compiling Swarm. These links provide directions:
* [[#MinGW|MinGW]]
* [[#Emacs|Emacs]]
* [[#GPerf|GPerf]]
== Build Support Libraries ==
The next steps are to build and install the libraries that Swarm depends on. A ZIP archive containing all the source code required can be found at:
[http://ftp.swarm.org/pub/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip http://ftp.swarm.org/pub/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip]
This archive contains two subdirectories:
* sources: This folder contains the source code for each component.
* patches: This folder contains patchfiles that modfy source code so that MinGW can compile it.
After downloading and extracting the source code archive, open up a MinGW shell and run the following commands:
<pre>cd /path/to/where/swarm/source/was/extracted
mkdir build</pre>
The following steps will all assume your MinGW shell is operating out of the <tt>build</tt> directory. All compiled software will be installed to <tt>/c/swarm</tt> (The Windows Explorer will see the folder appear at <tt>C:\swarm</tt>).
=== ZLib ===
ZLib will be the first library to be built as it is a common dependency for many of the other software components. From the <tt>build</tt> directory, execute the following to build Zlib:
<pre>tar xzf ../sources/zlib-1.2.5.tar.gz
cd zlib-1.2.5
make -f win32/Makefile.gcc</pre>
And then the following commands to install ZLib to <tt>/c/swarm</tt>:
<pre>mkdir -p /c/swarm/bin
mkdir -p /c/swarm/include
mkdir -p /c/swarm/lib
cp zlib1.dll /c/swarm/bin/
cp zconf.h zlib.h /c/swarm/include/
mv libzdll.a libz.dll.a
cp *.a /c/swarm/lib</pre>
=== LibPNG ===
LibPNG will be built next as its only dependency is ZLib. From the <tt>build</tt> directory, execute the following steps to build and install LibPNG:
<pre>tar xjf ../sources/libpng-1.5.4.tar.bz2
cd libpng-1.5.4
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm --with-zlib-prefix=/c/swarm
make
make install</pre>
=== XPM ===
Starting from the <tt>build</tt> directory, the XPM library can be built and installed as follows:
<pre>tar xjf ../sources/xpm-nox-4.2.0.tar.bz2
cd xpm-nox-4.2.0
patch -p1 &lt; ../../patches/xpm-nox-4.2.0-mingw-tcl.patch
make CC=gcc
make install prefix=/c/swarm</pre>
'''Summary of patchfile changes:'''
The patchfile is inherited from the SUSE builds of XPM for MinGW and adds Makefiles and other critical components.
One major modification has been made to the SUSE patchfile---<tt>tcl.h</tt> is included in <tt>xpm.h</tt>. This is required in order to use XPM while Tk is installed. Conversely, this means that this build of XPM cannot be used without having Tk installed.
=== LibFFI ===
Starting from the <tt>build</tt> directory, LibFFI can be built and installed as follows:
<pre>tar xzf ../sources/libffi-3.0.9.tar.gz
cd libffi-3.0.9
./configure --prefix=/c/swarm
make
make install</pre>
The LibFFI headers get installed in a weird place.
<pre>mv /c/swarm/lib/libffi-3.0.9/include/*.h /c/swarm/include
rm -rf /c/swarm/lib/libffi-3.0.9</pre>
=== Tcl ===
Starting from the <tt>build</tt> directory, Tcl can be built and installed as follows:
<pre>tar xzf ../sources/tcl8.4.19-src.tar.gz
cd tcl8.4.19
patch -p1 &lt; ../../patches/tcl-8.4.19-fix-lvalues.patch
cd win
./configure --prefix=/c/swarm
make
make install</pre>
'''Summary of patchfile changes:'''
At two places in the TCL source code, an assignment is made while simultaneously performing a typecast. The typecast and the assignment had to be split into separate operations in order to be acceptable to the MinGW compilers.
=== Tk ===
Starting from the <tt>build</tt> directory, Tk can be built and installed as follows:
<pre>tar xzf ../sources/tk8.4.19-src.tar.gz
cd tk8.4.19/win
./configure --prefix=/c/swarm
make
make install</pre>
=== BLT ===
Starting from the <tt>build</tt> directory, BLT can be built and installed as follows:
<pre>tar xzf ../sources/BLT2.4z.tar.gz
cd blt2.4z
./configure --prefix=/c/swarm --without-x
make
make install</pre>
=== HDF5 (Optional) ===
Getting HDF5 to work with MinGW is a little tricky. It is an optional dependency, so if support for reading and writing <tt>.hdf</tt> files is not needed this section can be skipped.
As of version 1.8.7, HDF5 currently does not compile under MinGW. So, we must wrap pre-compiled binaries for use with MinGW. In order to wrap the binaries, we will need an additional tool called <tt>pexports</tt>. This can be installed using <tt>mingw-get</tt>:
<pre>mingw-get install mingw-utils</pre>
Download 32-bit Windows binaries from the HDF website compiled for use with the Visual Studio compilers (these files have &quot;VS&quot; listed under the ''Compilers'' section). After extracting the archive, the HDF5 libraries can be wrapped for use with MinGW by executing the following commands:
<pre>cd path/to/where/HDF5/was/extracted
for dll in `ls dll/*dll`; do
def_file=`basename $dll .dll`.def
lib_file=lib`basename $dll dll.dll`.a
pexports $dll &gt; $def_file
dlltool -d $def_file -l lib/$lib_file
done</pre>
Next, move the libraries and header files needed to use HDF5 from C into <tt>C:\swarm</tt>:
<pre>cp dll/hdf5dll.dll dll/szip.dll /c/swarm/bin
cp include/* /c/swarm/include
cp lib/libhdf5.a /c/swarm/lib</pre>
Finally, a patch must be applied to the HDF header file <tt>H5public.h</tt> so that it doesn't define <tt>ssize_t</tt>---a constant already defined by MinGW. The required patch is contained in the Swarm MinGW source archive:
<pre>cd /path/to/where/swarm/source/was/extracted
patch -p1 -d /c/swarm &lt; patches/hdf5-1.8.7-mingw.patch</pre>
== Build Swarm ==
Finally, the Swarm libraries themselves can be built. From the <tt>build</tt> directory, execute the following
<pre>tar xzf ../sources/swarm-2.4.1.tar.gz
cd swarm-2.4.1
patch -p1 ../../patches/swarm-2.4.1-mingw.patch
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm \
--with-zlibdir=/c/swarm \
--with-pngdir=/c/swarm \
--with-xpmdir=/c/swarm \
--with-ffidir=/c/swarm \
--with-tcl=/c/swarm/lib \
--with-tk=/c/swarm/lib \
--with-bltdir=/c/swarm
cd avcall
gcc -S avcall-i386.c
cd ..
make
make install</pre>
If you wrapped HDF5 up for use with MinGW, add <tt>--with-hdf5dir=/c/swarm</tt> to the list of arguments passed to <tt>configure</tt>.
'''Summary of patchfile changes:'''
<tt>swarm-2.4.1-mingw.patch</tt> modifies the Swarm source code in the following ways:
* <tt>gettimeofday</tt> is no longer defined in the Swarm sources as MinGW includes this function in its standard library.
* Swarm GUI functions are updated to be compatible with LibPNG 1.5.
* The Swarm <tt>configure</tt> script defines <tt>DATADIR</tt> as a preprocessor macro---this conflicts with variables in the GCC Objective-C library. <tt>DATDIR</tt> is <tt>undef</tt>ed in critical parts of the source code.
* The <tt>sleep</tt> function is aliased to <tt>usleep</tt>---which is the name of the MinGW implementation.
* The way in which Makefiles invoke <tt>gperf</tt> is amended so that it actually produces output.
* NULL checks are added to `zstrdup` in src/defobj/internal.m. Some functions in the Swarm library may attempt to call `zstrdup` on a NULL pointer. (This happens if the SWARMHOME environment variable is not set.) Failing to check for this condition can lead to segfaults. `zstrdup` now returns NULL if passed a NULL string or if `alloc` fails to allocate memory for a duplicate.
Full details are contained in the patchfile.
= Tools =
== MinGW ==
'''Homepage:''' http://www.mingw.org
'''Download Area:''' http://sourceforge.net/projects/mingw/files
'''Version Used:''' 20110530
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
[http://www.mingw.org MinGW] is a set of software that aims to provide an environment where software developed on UNIX-like systems can be easily compiled for Windows. Since Swarm is primarily developed on Linux (a UNIX clone), MinGW can ease the task of creating Swarm models that run on Windows.
MinGW is similar to the [http://www.cygwin.org Cygwin] project. The major difference is that MinGW produces executables that depend only on native Windows libraries while Cygwin executables require special compatibility libraries that are part of the Cygwin distribution.
=== Installing MinGW ===
MinGW can be installed by downloading the &quot;Automated MinGW Installer&quot;, which usually has a name like <tt>mingw-get-inst-&lt;date&gt;.exe</tt> where <tt>&lt;date&gt;</tt> is the datestamp for when the installer was packaged. Running this executable will start the installation process. The installer lets you select which optional components to install; make sure all boxes are checked so you '''install all components'''.
[[Image:MinGW_Setup.png|frame|none|alt=Install all available MinGW components]]
The installer downloads all components from the internet. This will take a while, so have a cup of coffee or walk the dog.
See the following section about also installing an optional, more-functional shell window for MinGW.
=== Using MinGW ===
The MinGW compilers are accessible through the &quot;MinGW Shell&quot; which should be located under the MinGW folder in the Start Menu:
[[Image:MinGW_Shell.png|frame|none|alt=Location of MinGW Shell]]
or by running <tt>C:\MinGW\msys\1.0\msys.bat</tt> (if MinGW was installed to its default location).
By default the MinGW shell executes inside of a Windows <tt>cmd.exe</tt> terminal. There are a couple major drawbacks to this:
* You cannot resize the window to full-screen.
* The shell provides limited history scrollback.
MinGW provides a couple of alternative terminals for the MinGW shell which do not have these drawbacks; one of which is called MinTTY. To install MinTTY execute the following in a MinGW shell:
<pre>mingw-get install mintty</pre>
Then the <tt>mintty</tt> command can be used to launch a MinTTY terminal. The MinGW Shell can also be set to launch MinTTY by default by editing the file <tt>C:\MinGW\msys\1.0\msys.bat</tt> and changing the following line (approximately line 58):
<pre>if &quot;x%MSYSCON%&quot; == &quot;xunknown&quot; set MSYSCON=sh.exe</pre>
to:
<pre>if &quot;x%MSYSCON%&quot; == &quot;xunknown&quot; set MSYSCON=mintty.exe</pre>
=== A Note About Paths ===
The MinGW Shell emulates a UNIX <tt>bash</tt> shell and thus uses UNIX-style paths, <tt>/path/to/file</tt>, instead of Windows-style paths, <tt>C:\path\to\file</tt>. One peculiarity of this process is that the shell must deal with the fact that Windows filesystems have multiple roots (<tt>C:</tt>, <tt>D:</tt>, etc.) while a UNIX filesystem only has one root called <tt>/</tt>. The way this is reconciled by the <tt>bash</tt> shell provided with MinGW is that <tt>/c</tt> refers to the root of the <tt>C:</tt> drive, <tt>/d</tt> refers to the root of the <tt>D:</tt> drive and so on and so forth.
The root of the filesystem itself, <tt>/</tt>, also has some caveats. <tt>/</tt> refers to the <tt>mysy</tt> folder, <tt>C:/MinGW/mysys/1.0</tt> in a default installation. <tt>/usr</tt> also refers to the same location. Thus, <tt>/usr/local</tt> and <tt>/local</tt> both refer to <tt>C:/MinGW/mysys/1.0/local</tt>.
=== A Note About MinGW-64 ===
Currently Swarm has been developed and tested against the 32-bit version of MinGW. Hence Swarm models produced this way should run in any version of Windows.
The [MinGW-w64][mingw_65] project produces 64-bit MinGW compilers that can produce 64-bit executables that will only run on 64-bit versions of Windows. These executables benefit from:
* Access to more memory. A 32-bit executable will only be able to allocate ~3 GB of RAM---even if the system has more RAM available.
* Possibly quicker execution speeds due to matching the native architecture of the operating system---however this depends on the types of tasks that the program executes. It has been reported that 64 bit Swarm executables run quicker than 32 bit Swarm executables on Linux.
Currently, no attempt has been made to compile Swarm 2.4.1 with the 64 bit MinGW compilers. If a successful attempt is made, please report it on the [http://www.swarm.org/mailman/listinfo/support Swarm mailing list].
== Emacs ==
'''Homepage:''' http://www.gnu.org/software/emacs
'''Version Used:''' 23.3
'''Download Area:''' http://ftp.gnu.org/gnu/emacs/windows
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GNU Emacs is a text editor that is used by many programmers to edit code. However, Emacs can also be scripted to perform a variety of complicated transformations on text files. The scripts that build the Swarm libraries use Emacs to automate the process of generating some source files. Thus Emacs has to be installed in order to build Swarm from source.
=== Installing Emacs ===
Install Emacs by downloading one of the <tt>emacs-&lt;version
number&gt;-bin-i386.zip</tt> files from the download area. Don't use any of the
files containing <tt>barebin</tt>. After extracting the ZIP archive there will
be an Emacs folder containing a subfolder called <tt>bin</tt>. Add this folder
to your Windows <tt>PATH</tt>. [[#RapidEE|RapidEE]] can help edit the
<tt>PATH</tt> variable.
== GPerf ==
'''Homepage:''' http://www.gnu.org/software/gperf/
'''Download Area:''' http://sourceforge.net/projects/gnuwin32/files/gperf
'''Version Used:''' 3.0.1
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GPerf is a program that produces C code containing hash functions. The scripts
that build the Swarm libraries use GPerf to generate some source code files.
Download <tt>gperf.exe</tt> from the GnuWin32 site on Sourceforge and place it
somewhere on your Windows <tt>PATH</tt>. Again, [[#RapidEE|RapidEE]] can help set the <tt>PATH</tt> variable.
== RapidEE ==
'''Homepage:''' http://www.rapidee.com
'''Version Used:''' 5.0
'''License:''' [http://www.rapidee.com/en/license Freeware]
The Rapid Environment Editor (RapidEE) is a spiffy tool that makes it easy to inspect and alter the value of Windows environment variables, such as the <tt>PATH</tt>. RapidEE may be used to edit &quot;System Variables&quot; which will affect all user accounts or &quot;User Variables&quot; which will affect just the current account. Administrative privileges may be required to edit the System Variables.
[[Image:RapidEE_1.png|frame|none|alt=The different variables RapidEE can edit]]
Right-clicking on the <tt>Path</tt> variable in the System Variables or User Variables will bring up a menu that presents the option to &quot;Add value&quot;:
[[Image:RapidEE_2.png|frame|none|alt=Adding a new value to the PATH]]
Once the new entry has been added, RapidEE must be told to save the changes. Command line shells, such as <tt>cmd.exe</tt>, must be restarted in order for them to notice the changes.
[[Image:RapidEE_3.png|frame|none|alt=Adding and saving a value]]
== Depends ==
'''Homepage:''' http://www.dependencywalker.com/
'''Version Used:''' 2.2
'''License:''' Freeware
Depends is a usefull utility that scans Windows executables and reports information concerning the Dynamic-link Libraries (DLLs) that those executables require in order to run.
= Software Used to Compile Swarm 2.4.1 =
{|
! Name
! Verson Used
! License
! Homepage
! Download Area
|-
| ZLib
| 1.2.5
| [http://www.opensource.org/licenses/Zlib ZLib/PNG License]
| [http://www.zlib.net http://www.zlib.net]
| --
|-
| LibFFI
| 3.0.9
| [http://www.opensource.org/licenses/MIT MIT]
| [http://sourceware.org/libffi http://sourceware.org/libffi]
| --
|-
| LibPNG
| 1.5.4
| [http://www.opensource.org/licenses/Zlib ZLib/PNG]
| [http://www.libpng.org/pub/png/libpng.html http://www.libpng.org/pub/png/libpng.html]
| --
|-
| XPM-NoX
| 4.2.0
| [http://www.opensource.org/licenses/MIT MIT]
| unknown
| [http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32 http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32]
|-
| Tcl
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| Tk
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| BLT
| 2.4z
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://blt.sourceforge.net http://blt.sourceforge.net]
| --
|-
| HDF5
| 1.8.7
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://www.hdfgroup.org/HDF5 http://www.hdfgroup.org/HDF5]
| --
|-
| Swarm
| 2.4.1
| [http://www.opensource.org/licenses/GPL-3.0 GPL]
| [http://www.swarm.org http://www.swarm.org]
| [http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
|}
f83f1cfc6cea6c12a9c882574859f2fc29fd9e39
2156
26
2015-12-02T22:49:49Z
SwarmWikiSysop
5
/* Using Swarm Models Compiled with MinGW */
wikitext
text/x-wiki
= Overview =
This documentation provides information on how to use Swarm on Windows with [http://www.mingw.org MinGW] compilers. The following topics will be covered:
* How to run a Swam model compiled with MinGW on Windows: Once you produce a Swarm model using MinGW (or someone gives one to you), how do you run it on other machines without installing Swarm there?
* How to use MinGW to compile your own Swarm models, either during model development or so you can distribute working models to others. This requires installing MinGW and our binary Swarm libraries.
* How to package a model compiled with MinGW so it can be installed and run by itself on Windows machines.
* How to use MinGW to compile the Swarm libraries, in case you want to build your own Swarm binaries.
Each topic is more difficult than the one before it. However the topics are independent in that it is not necessary to know how to compile the Swarm library in order to run a pre-compiled Swarm model or compile your own model against a pre-compiled version of Swarm.
= Using Swarm Models Compiled with MinGW =
A model that has been compiled using MinGW can be installed and run from a Windows computer without installing MinGW or Swarm. An example code is this build of Heatbugs:
[http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe http://download.savannah.gnu.org/releases/swarm/src/testing/heatbugs-MinGW-win32.exe]
However, running a Swarm model requires some support programs and libraries. These are available as
<tt>swarm-2.4.1-win32.zip</tt>, available here:
[http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip http://download.savannah.gnu.org/releases/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip]
Unzipping that file will create a folder called <tt>swarm</tt> which should be moved somewhere that is easy to remember. The rest of this tutorial will assume this Swarm folder has been placed at <tt>C:\swarm</tt>.
Before a Swarm model can be run, the <tt>swarm\bin</tt> folder must be added to the Windows <tt>PATH</tt> so that Heatbugs can find necessary libraries when it runs. The <tt>swarm\bin</tt> folder can be ''temporarily'' added to the path by executing the following in the Windows command line (the command line is accessed using the program <tt>cmd.exe</tt>):
<pre>path=%PATH%;C:\swarm\bin</pre>
However, it is possible to have conflicts if other versions of libraries used by Swarm, such as HDF5, are already installed and in your path. And some Swarm programs require that the environment variable SWARMHOME be defined, which will typically not be true. These problems can be avoided by using the following statements instead of the above path command:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%</pre>
You can alternatively add the Swarm folder to your <tt>PATH</tt> permanently by editing the Windows PATH environment variable. A tool like [[#RapidEE|RapidEE]] makes doing so easy, or you can use use Windows control panel > System > Advanced > Environment Variables to add <tt>swarm\bin</tt> to the PATH system variable.
Once the path has been set to include the <tt>swarm\bin</tt> folder, Swarm models can be started through the Windows command line, or by double-clicking on them from the Windows Explorer.
The Heatbugs model can now be run by changing the directory of the command line to the folder holding <tt>heatbugs.exe</tt> and then executing the program. For example, if <tt>heatbugs.exe</tt> is located in <tt>C:\Users\example_user\Downloads</tt>, then the model may be run as follows:
<pre>cd C:\Users\example_user\Downloads
heatbugs.exe</pre>
(or you can just double-click on <tt>heatbugs.exe</tt> from Windows Explorer, which temporarily opens a Windows command terminal while the model runs.)
[[Image:Running_Heatbugs.png|frame|none|alt=Running the Heatbugs model]]
You can also create a simple Windows batch file that sets SWARMHOME and the path and then executes the model. Create a file called, for example <tt>heatbugs.bat</tt> in the same directory where <tt>heatbugs.exe</tt> is, containing these lines:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%
heatbugs.exe</pre>
Then, just double-clicking on <tt>heatbugs.bat</tt> will start the model.
If you try this and get an error that some .dll file is not found, then the problem is likely that the path is not set correctly to include the swarm\bin folder. If instead the program crashes without an error statement, then the problem is more likely that SWARMHOME needs to be set.
= Installing Swarm and MinGW to compile models =
To compile Swarm models from source using MinGW, the following simple steps need to be taken to set up the build environment:
* [[#MinGW|Install MinGW using instructions here]]. Currently only 32-bit MinGW can be used with Swarm. Install all components of MinGW.
* Download compiled Swarm binaries, archived as [http://ftp.swarm.org/pub/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip swarm-2.4.1-win32.zip]. Unzip the archive and place the extracted folder at <tt>C:\swarm</tt>.
'''NOTE:'''
The archived Swarm binaries '''MUST''' be placed at <tt>C:\swarm</tt> to successfully compile Swarm models. This is because some paths had to be hard-coded by <tt>libtool</tt> during the creation of the binaries.
The final step before you can compile a Swarm model is to set the <tt>SWARMHOME</tt> environment variable so that the "make" program knows where to find the Swarm libraries when compiling your code. There are several ways to do this.
*You can temporarily set SWARMHOME by entering this command in the MinGW shell: <pre>export SWARMHOME=/c/swarm</pre>
*You can edit your Makefile so it starts with: <pre>SWARMHOME=/c/swarm</pre>
*Set SWARMHOME permanently as a Windows environment variable, either by using [[#RapidEE|RapidEE]] or Windows control panel > System > Advanced > Environment Variables to add a new (User or System) variable called SWARMHOME with the value <tt>/c/swarm</tt>.
After MinGW has been installed and the Swarm binaries have been downloaded, Swarm models may be compiled using the MinGW shell. Start up the program MinGW Shell, cd to the directory containing your code and Makefile, and enter the command "Make".
An archive of official Swarm example programs can be downloaded from:
[http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
We will use the &quot;Heatbugs&quot; model as an example of how to compile a Swarm application:
<pre>tar xzf /path/to/downloaded/swarmapps-2.3.0.tar.gz
cd swarmapps-2.3.0/objc/heatbugs
make</pre>
'''VERY IMPORTANT NOTE: MinGW produces two executables called <tt>heatbugs.exe</tt>---one in the <tt>heatbugs</tt> folder and another in the <tt>heatbugs/.libs</tt> folder. You should ignore the executable in the top-level folder, <tt>heatbugs/heatbugs.exe</tt>, as it is merely a compiled wrapper script that executes <tt>heatbugs/.libs/heatbugs.exe</tt>. When distributing compiled models, only use binaries from the <tt>.libs</tt> folder.'''
The resulting executable, <tt>.libs/heatbugs.exe</tt> may be executing by following the steps described above at ''Using Swarm Models Compiled with MinGW''. These steps must include setting the Windows Path to include <tt>C:\swarm\bin</tt>.
= Distributing a Swarm Model for Windows Users =
A major benefit of the MinGW version of Swarm is that models can be distributed for people to use without installing Swarm. A simple way to do this, after the model has been compiled and tested using methods in the previous section, is to create a ZIP archive that contains all the files to run the model.
* Create a directory tree that includes the Swarm binary files. For example, create C:\MySwarmModel and add the Swarm binaries (as described [[Swarm_and_MinGW#Using_Swarm_Models_Compiled_with_MinGW|above]]) to it as a subdirectory tree.
* Create another subdirectory that includes just the compiled model.
* Create a third subdirectory that includes any input files that the model needs and a batch file that sets the path and executes the model.
* Zip the whole tree up for distribution.
The directory tree in the zip file looks like this:
<pre>
C:\MySwarmModel\swarm
\bin
\etc
\include
\lib
\man
\share
\executable\MySwarmModel.exe
\Runfiles\MySwarmModel.bat (and any input files)
</pre>
where the file <tt>MySwarmModel.bat</tt> contains:
<pre>
set SWARMHOME=C:\MySwarmModel\swarm
path=%SWARMHOME%\bin;%PATH%
C:\MySwarmModel\executable\MySwarmModel.exe
</pre>
Then users can run the model just by double-clicking on <tt>MySwarmModel.bat</tt>.
= Building Swarm Using MinGW =
This tutorial provides directions and code for compiling your own Swarm libraries for Windows. It is a bit advanced---some familiarity with compiling software from source in a Linux environment and knowledge of the UNIX command line is assumed.
== Install Required Tools ==
The first step is to download and install tools required for compiling Swarm. These links provide directions:
* [[#MinGW|MinGW]]
* [[#Emacs|Emacs]]
* [[#GPerf|GPerf]]
== Build Support Libraries ==
The next steps are to build and install the libraries that Swarm depends on. A ZIP archive containing all the source code required can be found at:
[http://ftp.swarm.org/pub/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip http://ftp.swarm.org/pub/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip]
This archive contains two subdirectories:
* sources: This folder contains the source code for each component.
* patches: This folder contains patchfiles that modfy source code so that MinGW can compile it.
After downloading and extracting the source code archive, open up a MinGW shell and run the following commands:
<pre>cd /path/to/where/swarm/source/was/extracted
mkdir build</pre>
The following steps will all assume your MinGW shell is operating out of the <tt>build</tt> directory. All compiled software will be installed to <tt>/c/swarm</tt> (The Windows Explorer will see the folder appear at <tt>C:\swarm</tt>).
=== ZLib ===
ZLib will be the first library to be built as it is a common dependency for many of the other software components. From the <tt>build</tt> directory, execute the following to build Zlib:
<pre>tar xzf ../sources/zlib-1.2.5.tar.gz
cd zlib-1.2.5
make -f win32/Makefile.gcc</pre>
And then the following commands to install ZLib to <tt>/c/swarm</tt>:
<pre>mkdir -p /c/swarm/bin
mkdir -p /c/swarm/include
mkdir -p /c/swarm/lib
cp zlib1.dll /c/swarm/bin/
cp zconf.h zlib.h /c/swarm/include/
mv libzdll.a libz.dll.a
cp *.a /c/swarm/lib</pre>
=== LibPNG ===
LibPNG will be built next as its only dependency is ZLib. From the <tt>build</tt> directory, execute the following steps to build and install LibPNG:
<pre>tar xjf ../sources/libpng-1.5.4.tar.bz2
cd libpng-1.5.4
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm --with-zlib-prefix=/c/swarm
make
make install</pre>
=== XPM ===
Starting from the <tt>build</tt> directory, the XPM library can be built and installed as follows:
<pre>tar xjf ../sources/xpm-nox-4.2.0.tar.bz2
cd xpm-nox-4.2.0
patch -p1 &lt; ../../patches/xpm-nox-4.2.0-mingw-tcl.patch
make CC=gcc
make install prefix=/c/swarm</pre>
'''Summary of patchfile changes:'''
The patchfile is inherited from the SUSE builds of XPM for MinGW and adds Makefiles and other critical components.
One major modification has been made to the SUSE patchfile---<tt>tcl.h</tt> is included in <tt>xpm.h</tt>. This is required in order to use XPM while Tk is installed. Conversely, this means that this build of XPM cannot be used without having Tk installed.
=== LibFFI ===
Starting from the <tt>build</tt> directory, LibFFI can be built and installed as follows:
<pre>tar xzf ../sources/libffi-3.0.9.tar.gz
cd libffi-3.0.9
./configure --prefix=/c/swarm
make
make install</pre>
The LibFFI headers get installed in a weird place.
<pre>mv /c/swarm/lib/libffi-3.0.9/include/*.h /c/swarm/include
rm -rf /c/swarm/lib/libffi-3.0.9</pre>
=== Tcl ===
Starting from the <tt>build</tt> directory, Tcl can be built and installed as follows:
<pre>tar xzf ../sources/tcl8.4.19-src.tar.gz
cd tcl8.4.19
patch -p1 &lt; ../../patches/tcl-8.4.19-fix-lvalues.patch
cd win
./configure --prefix=/c/swarm
make
make install</pre>
'''Summary of patchfile changes:'''
At two places in the TCL source code, an assignment is made while simultaneously performing a typecast. The typecast and the assignment had to be split into separate operations in order to be acceptable to the MinGW compilers.
=== Tk ===
Starting from the <tt>build</tt> directory, Tk can be built and installed as follows:
<pre>tar xzf ../sources/tk8.4.19-src.tar.gz
cd tk8.4.19/win
./configure --prefix=/c/swarm
make
make install</pre>
=== BLT ===
Starting from the <tt>build</tt> directory, BLT can be built and installed as follows:
<pre>tar xzf ../sources/BLT2.4z.tar.gz
cd blt2.4z
./configure --prefix=/c/swarm --without-x
make
make install</pre>
=== HDF5 (Optional) ===
Getting HDF5 to work with MinGW is a little tricky. It is an optional dependency, so if support for reading and writing <tt>.hdf</tt> files is not needed this section can be skipped.
As of version 1.8.7, HDF5 currently does not compile under MinGW. So, we must wrap pre-compiled binaries for use with MinGW. In order to wrap the binaries, we will need an additional tool called <tt>pexports</tt>. This can be installed using <tt>mingw-get</tt>:
<pre>mingw-get install mingw-utils</pre>
Download 32-bit Windows binaries from the HDF website compiled for use with the Visual Studio compilers (these files have &quot;VS&quot; listed under the ''Compilers'' section). After extracting the archive, the HDF5 libraries can be wrapped for use with MinGW by executing the following commands:
<pre>cd path/to/where/HDF5/was/extracted
for dll in `ls dll/*dll`; do
def_file=`basename $dll .dll`.def
lib_file=lib`basename $dll dll.dll`.a
pexports $dll &gt; $def_file
dlltool -d $def_file -l lib/$lib_file
done</pre>
Next, move the libraries and header files needed to use HDF5 from C into <tt>C:\swarm</tt>:
<pre>cp dll/hdf5dll.dll dll/szip.dll /c/swarm/bin
cp include/* /c/swarm/include
cp lib/libhdf5.a /c/swarm/lib</pre>
Finally, a patch must be applied to the HDF header file <tt>H5public.h</tt> so that it doesn't define <tt>ssize_t</tt>---a constant already defined by MinGW. The required patch is contained in the Swarm MinGW source archive:
<pre>cd /path/to/where/swarm/source/was/extracted
patch -p1 -d /c/swarm &lt; patches/hdf5-1.8.7-mingw.patch</pre>
== Build Swarm ==
Finally, the Swarm libraries themselves can be built. From the <tt>build</tt> directory, execute the following
<pre>tar xzf ../sources/swarm-2.4.1.tar.gz
cd swarm-2.4.1
patch -p1 ../../patches/swarm-2.4.1-mingw.patch
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm \
--with-zlibdir=/c/swarm \
--with-pngdir=/c/swarm \
--with-xpmdir=/c/swarm \
--with-ffidir=/c/swarm \
--with-tcl=/c/swarm/lib \
--with-tk=/c/swarm/lib \
--with-bltdir=/c/swarm
cd avcall
gcc -S avcall-i386.c
cd ..
make
make install</pre>
If you wrapped HDF5 up for use with MinGW, add <tt>--with-hdf5dir=/c/swarm</tt> to the list of arguments passed to <tt>configure</tt>.
'''Summary of patchfile changes:'''
<tt>swarm-2.4.1-mingw.patch</tt> modifies the Swarm source code in the following ways:
* <tt>gettimeofday</tt> is no longer defined in the Swarm sources as MinGW includes this function in its standard library.
* Swarm GUI functions are updated to be compatible with LibPNG 1.5.
* The Swarm <tt>configure</tt> script defines <tt>DATADIR</tt> as a preprocessor macro---this conflicts with variables in the GCC Objective-C library. <tt>DATDIR</tt> is <tt>undef</tt>ed in critical parts of the source code.
* The <tt>sleep</tt> function is aliased to <tt>usleep</tt>---which is the name of the MinGW implementation.
* The way in which Makefiles invoke <tt>gperf</tt> is amended so that it actually produces output.
* NULL checks are added to `zstrdup` in src/defobj/internal.m. Some functions in the Swarm library may attempt to call `zstrdup` on a NULL pointer. (This happens if the SWARMHOME environment variable is not set.) Failing to check for this condition can lead to segfaults. `zstrdup` now returns NULL if passed a NULL string or if `alloc` fails to allocate memory for a duplicate.
Full details are contained in the patchfile.
= Tools =
== MinGW ==
'''Homepage:''' http://www.mingw.org
'''Download Area:''' http://sourceforge.net/projects/mingw/files
'''Version Used:''' 20110530
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
[http://www.mingw.org MinGW] is a set of software that aims to provide an environment where software developed on UNIX-like systems can be easily compiled for Windows. Since Swarm is primarily developed on Linux (a UNIX clone), MinGW can ease the task of creating Swarm models that run on Windows.
MinGW is similar to the [http://www.cygwin.org Cygwin] project. The major difference is that MinGW produces executables that depend only on native Windows libraries while Cygwin executables require special compatibility libraries that are part of the Cygwin distribution.
=== Installing MinGW ===
MinGW can be installed by downloading the &quot;Automated MinGW Installer&quot;, which usually has a name like <tt>mingw-get-inst-&lt;date&gt;.exe</tt> where <tt>&lt;date&gt;</tt> is the datestamp for when the installer was packaged. Running this executable will start the installation process. The installer lets you select which optional components to install; make sure all boxes are checked so you '''install all components'''.
[[Image:MinGW_Setup.png|frame|none|alt=Install all available MinGW components]]
The installer downloads all components from the internet. This will take a while, so have a cup of coffee or walk the dog.
See the following section about also installing an optional, more-functional shell window for MinGW.
=== Using MinGW ===
The MinGW compilers are accessible through the &quot;MinGW Shell&quot; which should be located under the MinGW folder in the Start Menu:
[[Image:MinGW_Shell.png|frame|none|alt=Location of MinGW Shell]]
or by running <tt>C:\MinGW\msys\1.0\msys.bat</tt> (if MinGW was installed to its default location).
By default the MinGW shell executes inside of a Windows <tt>cmd.exe</tt> terminal. There are a couple major drawbacks to this:
* You cannot resize the window to full-screen.
* The shell provides limited history scrollback.
MinGW provides a couple of alternative terminals for the MinGW shell which do not have these drawbacks; one of which is called MinTTY. To install MinTTY execute the following in a MinGW shell:
<pre>mingw-get install mintty</pre>
Then the <tt>mintty</tt> command can be used to launch a MinTTY terminal. The MinGW Shell can also be set to launch MinTTY by default by editing the file <tt>C:\MinGW\msys\1.0\msys.bat</tt> and changing the following line (approximately line 58):
<pre>if &quot;x%MSYSCON%&quot; == &quot;xunknown&quot; set MSYSCON=sh.exe</pre>
to:
<pre>if &quot;x%MSYSCON%&quot; == &quot;xunknown&quot; set MSYSCON=mintty.exe</pre>
=== A Note About Paths ===
The MinGW Shell emulates a UNIX <tt>bash</tt> shell and thus uses UNIX-style paths, <tt>/path/to/file</tt>, instead of Windows-style paths, <tt>C:\path\to\file</tt>. One peculiarity of this process is that the shell must deal with the fact that Windows filesystems have multiple roots (<tt>C:</tt>, <tt>D:</tt>, etc.) while a UNIX filesystem only has one root called <tt>/</tt>. The way this is reconciled by the <tt>bash</tt> shell provided with MinGW is that <tt>/c</tt> refers to the root of the <tt>C:</tt> drive, <tt>/d</tt> refers to the root of the <tt>D:</tt> drive and so on and so forth.
The root of the filesystem itself, <tt>/</tt>, also has some caveats. <tt>/</tt> refers to the <tt>mysy</tt> folder, <tt>C:/MinGW/mysys/1.0</tt> in a default installation. <tt>/usr</tt> also refers to the same location. Thus, <tt>/usr/local</tt> and <tt>/local</tt> both refer to <tt>C:/MinGW/mysys/1.0/local</tt>.
=== A Note About MinGW-64 ===
Currently Swarm has been developed and tested against the 32-bit version of MinGW. Hence Swarm models produced this way should run in any version of Windows.
The [MinGW-w64][mingw_65] project produces 64-bit MinGW compilers that can produce 64-bit executables that will only run on 64-bit versions of Windows. These executables benefit from:
* Access to more memory. A 32-bit executable will only be able to allocate ~3 GB of RAM---even if the system has more RAM available.
* Possibly quicker execution speeds due to matching the native architecture of the operating system---however this depends on the types of tasks that the program executes. It has been reported that 64 bit Swarm executables run quicker than 32 bit Swarm executables on Linux.
Currently, no attempt has been made to compile Swarm 2.4.1 with the 64 bit MinGW compilers. If a successful attempt is made, please report it on the [http://www.swarm.org/mailman/listinfo/support Swarm mailing list].
== Emacs ==
'''Homepage:''' http://www.gnu.org/software/emacs
'''Version Used:''' 23.3
'''Download Area:''' http://ftp.gnu.org/gnu/emacs/windows
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GNU Emacs is a text editor that is used by many programmers to edit code. However, Emacs can also be scripted to perform a variety of complicated transformations on text files. The scripts that build the Swarm libraries use Emacs to automate the process of generating some source files. Thus Emacs has to be installed in order to build Swarm from source.
=== Installing Emacs ===
Install Emacs by downloading one of the <tt>emacs-&lt;version
number&gt;-bin-i386.zip</tt> files from the download area. Don't use any of the
files containing <tt>barebin</tt>. After extracting the ZIP archive there will
be an Emacs folder containing a subfolder called <tt>bin</tt>. Add this folder
to your Windows <tt>PATH</tt>. [[#RapidEE|RapidEE]] can help edit the
<tt>PATH</tt> variable.
== GPerf ==
'''Homepage:''' http://www.gnu.org/software/gperf/
'''Download Area:''' http://sourceforge.net/projects/gnuwin32/files/gperf
'''Version Used:''' 3.0.1
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GPerf is a program that produces C code containing hash functions. The scripts
that build the Swarm libraries use GPerf to generate some source code files.
Download <tt>gperf.exe</tt> from the GnuWin32 site on Sourceforge and place it
somewhere on your Windows <tt>PATH</tt>. Again, [[#RapidEE|RapidEE]] can help set the <tt>PATH</tt> variable.
== RapidEE ==
'''Homepage:''' http://www.rapidee.com
'''Version Used:''' 5.0
'''License:''' [http://www.rapidee.com/en/license Freeware]
The Rapid Environment Editor (RapidEE) is a spiffy tool that makes it easy to inspect and alter the value of Windows environment variables, such as the <tt>PATH</tt>. RapidEE may be used to edit &quot;System Variables&quot; which will affect all user accounts or &quot;User Variables&quot; which will affect just the current account. Administrative privileges may be required to edit the System Variables.
[[Image:RapidEE_1.png|frame|none|alt=The different variables RapidEE can edit]]
Right-clicking on the <tt>Path</tt> variable in the System Variables or User Variables will bring up a menu that presents the option to &quot;Add value&quot;:
[[Image:RapidEE_2.png|frame|none|alt=Adding a new value to the PATH]]
Once the new entry has been added, RapidEE must be told to save the changes. Command line shells, such as <tt>cmd.exe</tt>, must be restarted in order for them to notice the changes.
[[Image:RapidEE_3.png|frame|none|alt=Adding and saving a value]]
== Depends ==
'''Homepage:''' http://www.dependencywalker.com/
'''Version Used:''' 2.2
'''License:''' Freeware
Depends is a usefull utility that scans Windows executables and reports information concerning the Dynamic-link Libraries (DLLs) that those executables require in order to run.
= Software Used to Compile Swarm 2.4.1 =
{|
! Name
! Verson Used
! License
! Homepage
! Download Area
|-
| ZLib
| 1.2.5
| [http://www.opensource.org/licenses/Zlib ZLib/PNG License]
| [http://www.zlib.net http://www.zlib.net]
| --
|-
| LibFFI
| 3.0.9
| [http://www.opensource.org/licenses/MIT MIT]
| [http://sourceware.org/libffi http://sourceware.org/libffi]
| --
|-
| LibPNG
| 1.5.4
| [http://www.opensource.org/licenses/Zlib ZLib/PNG]
| [http://www.libpng.org/pub/png/libpng.html http://www.libpng.org/pub/png/libpng.html]
| --
|-
| XPM-NoX
| 4.2.0
| [http://www.opensource.org/licenses/MIT MIT]
| unknown
| [http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32 http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32]
|-
| Tcl
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| Tk
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| BLT
| 2.4z
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://blt.sourceforge.net http://blt.sourceforge.net]
| --
|-
| HDF5
| 1.8.7
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://www.hdfgroup.org/HDF5 http://www.hdfgroup.org/HDF5]
| --
|-
| Swarm
| 2.4.1
| [http://www.opensource.org/licenses/GPL-3.0 GPL]
| [http://www.swarm.org http://www.swarm.org]
| [http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
|}
7c7a05bd8367bb8a157a8be2ebc9a9bc3ae371b1
26
8
2015-03-07T06:21:48Z
Pauljohn32
1
wikitext
text/x-wiki
= Overview =
This documentation provides information on how to use Swarm on Windows with [http://www.mingw.org MinGW] compilers. The following topics will be covered:
* How to run a Swam model compiled with MinGW on Windows: Once you produce a Swarm model using MinGW (or someone gives one to you), how do you run it on other machines without installing Swarm there?
* How to use MinGW to compile your own Swarm models, either during model development or so you can distribute working models to others. This requires installing MinGW and our binary Swarm libraries.
* How to package a model compiled with MinGW so it can be installed and run by itself on Windows machines.
* How to use MinGW to compile the Swarm libraries, in case you want to build your own Swarm binaries.
Each topic is more difficult than the one before it. However the topics are independent in that it is not necessary to know how to compile the Swarm library in order to run a pre-compiled Swarm model or compile your own model against a pre-compiled version of Swarm.
= Using Swarm Models Compiled with MinGW =
A model that has been compiled using MinGW can be installed and run from a Windows computer without installing MinGW or Swarm. An example code is this build of Heatbugs:
[http://ftp.swarm.org/pub/swarm/src/testing/heatbugs-MinGW-win32.exe http://ftp.swarm.org/pub/swarm/src/testing/heatbugs-MinGW-win32.exe]
However, running a Swarm model requires some support programs and libraries. These are available as
<tt>swarm-2.4.1-win32.zip</tt>, available here:
[http://ftp.swarm.org/pub/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip http://ftp.swarm.org/pub/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip]
Unzipping that file will create a folder called <tt>swarm</tt> which should be moved somewhere that is easy to remember. The rest of this tutorial will assume this Swarm folder has been placed at <tt>C:\swarm</tt>.
Before a Swarm model can be run, the <tt>swarm\bin</tt> folder must be added to the Windows <tt>PATH</tt> so that Heatbugs can find necessary libraries when it runs. The <tt>swarm\bin</tt> folder can be ''temporarily'' added to the path by executing the following in the Windows command line (the command line is accessed using the program <tt>cmd.exe</tt>):
<pre>path=%PATH%;C:\swarm\bin</pre>
However, it is possible to have conflicts if other versions of libraries used by Swarm, such as HDF5, are already installed and in your path. And some Swarm programs require that the environment variable SWARMHOME be defined, which will typically not be true. These problems can be avoided by using the following statements instead of the above path command:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%</pre>
You can alternatively add the Swarm folder to your <tt>PATH</tt> permanently by editing the Windows PATH environment variable. A tool like [[#RapidEE|RapidEE]] makes doing so easy, or you can use use Windows control panel > System > Advanced > Environment Variables to add <tt>swarm\bin</tt> to the PATH system variable.
Once the path has been set to include the <tt>swarm\bin</tt> folder, Swarm models can be started through the Windows command line, or by double-clicking on them from the Windows Explorer.
The Heatbugs model can now be run by changing the directory of the command line to the folder holding <tt>heatbugs.exe</tt> and then executing the program. For example, if <tt>heatbugs.exe</tt> is located in <tt>C:\Users\example_user\Downloads</tt>, then the model may be run as follows:
<pre>cd C:\Users\example_user\Downloads
heatbugs.exe</pre>
(or you can just double-click on <tt>heatbugs.exe</tt> from Windows Explorer, which temporarily opens a Windows command terminal while the model runs.)
[[Image:Running_Heatbugs.png|frame|none|alt=Running the Heatbugs model]]
You can also create a simple Windows batch file that sets SWARMHOME and the path and then executes the model. Create a file called, for example <tt>heatbugs.bat</tt> in the same directory where <tt>heatbugs.exe</tt> is, containing these lines:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%
heatbugs.exe</pre>
Then, just double-clicking on <tt>heatbugs.bat</tt> will start the model.
If you try this and get an error that some .dll file is not found, then the problem is likely that the path is not set correctly to include the swarm\bin folder. If instead the program crashes without an error statement, then the problem is more likely that SWARMHOME needs to be set.
= Installing Swarm and MinGW to compile models =
To compile Swarm models from source using MinGW, the following simple steps need to be taken to set up the build environment:
* [[#MinGW|Install MinGW using instructions here]]. Currently only 32-bit MinGW can be used with Swarm. Install all components of MinGW.
* Download compiled Swarm binaries, archived as [http://ftp.swarm.org/pub/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip swarm-2.4.1-win32.zip]. Unzip the archive and place the extracted folder at <tt>C:\swarm</tt>.
'''NOTE:'''
The archived Swarm binaries '''MUST''' be placed at <tt>C:\swarm</tt> to successfully compile Swarm models. This is because some paths had to be hard-coded by <tt>libtool</tt> during the creation of the binaries.
The final step before you can compile a Swarm model is to set the <tt>SWARMHOME</tt> environment variable so that the "make" program knows where to find the Swarm libraries when compiling your code. There are several ways to do this.
*You can temporarily set SWARMHOME by entering this command in the MinGW shell: <pre>export SWARMHOME=/c/swarm</pre>
*You can edit your Makefile so it starts with: <pre>SWARMHOME=/c/swarm</pre>
*Set SWARMHOME permanently as a Windows environment variable, either by using [[#RapidEE|RapidEE]] or Windows control panel > System > Advanced > Environment Variables to add a new (User or System) variable called SWARMHOME with the value <tt>/c/swarm</tt>.
After MinGW has been installed and the Swarm binaries have been downloaded, Swarm models may be compiled using the MinGW shell. Start up the program MinGW Shell, cd to the directory containing your code and Makefile, and enter the command "Make".
An archive of official Swarm example programs can be downloaded from:
[http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
We will use the &quot;Heatbugs&quot; model as an example of how to compile a Swarm application:
<pre>tar xzf /path/to/downloaded/swarmapps-2.3.0.tar.gz
cd swarmapps-2.3.0/objc/heatbugs
make</pre>
'''VERY IMPORTANT NOTE: MinGW produces two executables called <tt>heatbugs.exe</tt>---one in the <tt>heatbugs</tt> folder and another in the <tt>heatbugs/.libs</tt> folder. You should ignore the executable in the top-level folder, <tt>heatbugs/heatbugs.exe</tt>, as it is merely a compiled wrapper script that executes <tt>heatbugs/.libs/heatbugs.exe</tt>. When distributing compiled models, only use binaries from the <tt>.libs</tt> folder.'''
The resulting executable, <tt>.libs/heatbugs.exe</tt> may be executing by following the steps described above at ''Using Swarm Models Compiled with MinGW''. These steps must include setting the Windows Path to include <tt>C:\swarm\bin</tt>.
= Distributing a Swarm Model for Windows Users =
A major benefit of the MinGW version of Swarm is that models can be distributed for people to use without installing Swarm. A simple way to do this, after the model has been compiled and tested using methods in the previous section, is to create a ZIP archive that contains all the files to run the model.
* Create a directory tree that includes the Swarm binary files. For example, create C:\MySwarmModel and add the Swarm binaries (as described [[Swarm_and_MinGW#Using_Swarm_Models_Compiled_with_MinGW|above]]) to it as a subdirectory tree.
* Create another subdirectory that includes just the compiled model.
* Create a third subdirectory that includes any input files that the model needs and a batch file that sets the path and executes the model.
* Zip the whole tree up for distribution.
The directory tree in the zip file looks like this:
<pre>
C:\MySwarmModel\swarm
\bin
\etc
\include
\lib
\man
\share
\executable\MySwarmModel.exe
\Runfiles\MySwarmModel.bat (and any input files)
</pre>
where the file <tt>MySwarmModel.bat</tt> contains:
<pre>
set SWARMHOME=C:\MySwarmModel\swarm
path=%SWARMHOME%\bin;%PATH%
C:\MySwarmModel\executable\MySwarmModel.exe
</pre>
Then users can run the model just by double-clicking on <tt>MySwarmModel.bat</tt>.
= Building Swarm Using MinGW =
This tutorial provides directions and code for compiling your own Swarm libraries for Windows. It is a bit advanced---some familiarity with compiling software from source in a Linux environment and knowledge of the UNIX command line is assumed.
== Install Required Tools ==
The first step is to download and install tools required for compiling Swarm. These links provide directions:
* [[#MinGW|MinGW]]
* [[#Emacs|Emacs]]
* [[#GPerf|GPerf]]
== Build Support Libraries ==
The next steps are to build and install the libraries that Swarm depends on. A ZIP archive containing all the source code required can be found at:
[http://ftp.swarm.org/pub/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip http://ftp.swarm.org/pub/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip]
This archive contains two subdirectories:
* sources: This folder contains the source code for each component.
* patches: This folder contains patchfiles that modfy source code so that MinGW can compile it.
After downloading and extracting the source code archive, open up a MinGW shell and run the following commands:
<pre>cd /path/to/where/swarm/source/was/extracted
mkdir build</pre>
The following steps will all assume your MinGW shell is operating out of the <tt>build</tt> directory. All compiled software will be installed to <tt>/c/swarm</tt> (The Windows Explorer will see the folder appear at <tt>C:\swarm</tt>).
=== ZLib ===
ZLib will be the first library to be built as it is a common dependency for many of the other software components. From the <tt>build</tt> directory, execute the following to build Zlib:
<pre>tar xzf ../sources/zlib-1.2.5.tar.gz
cd zlib-1.2.5
make -f win32/Makefile.gcc</pre>
And then the following commands to install ZLib to <tt>/c/swarm</tt>:
<pre>mkdir -p /c/swarm/bin
mkdir -p /c/swarm/include
mkdir -p /c/swarm/lib
cp zlib1.dll /c/swarm/bin/
cp zconf.h zlib.h /c/swarm/include/
mv libzdll.a libz.dll.a
cp *.a /c/swarm/lib</pre>
=== LibPNG ===
LibPNG will be built next as its only dependency is ZLib. From the <tt>build</tt> directory, execute the following steps to build and install LibPNG:
<pre>tar xjf ../sources/libpng-1.5.4.tar.bz2
cd libpng-1.5.4
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm --with-zlib-prefix=/c/swarm
make
make install</pre>
=== XPM ===
Starting from the <tt>build</tt> directory, the XPM library can be built and installed as follows:
<pre>tar xjf ../sources/xpm-nox-4.2.0.tar.bz2
cd xpm-nox-4.2.0
patch -p1 &lt; ../../patches/xpm-nox-4.2.0-mingw-tcl.patch
make CC=gcc
make install prefix=/c/swarm</pre>
'''Summary of patchfile changes:'''
The patchfile is inherited from the SUSE builds of XPM for MinGW and adds Makefiles and other critical components.
One major modification has been made to the SUSE patchfile---<tt>tcl.h</tt> is included in <tt>xpm.h</tt>. This is required in order to use XPM while Tk is installed. Conversely, this means that this build of XPM cannot be used without having Tk installed.
=== LibFFI ===
Starting from the <tt>build</tt> directory, LibFFI can be built and installed as follows:
<pre>tar xzf ../sources/libffi-3.0.9.tar.gz
cd libffi-3.0.9
./configure --prefix=/c/swarm
make
make install</pre>
The LibFFI headers get installed in a weird place.
<pre>mv /c/swarm/lib/libffi-3.0.9/include/*.h /c/swarm/include
rm -rf /c/swarm/lib/libffi-3.0.9</pre>
=== Tcl ===
Starting from the <tt>build</tt> directory, Tcl can be built and installed as follows:
<pre>tar xzf ../sources/tcl8.4.19-src.tar.gz
cd tcl8.4.19
patch -p1 &lt; ../../patches/tcl-8.4.19-fix-lvalues.patch
cd win
./configure --prefix=/c/swarm
make
make install</pre>
'''Summary of patchfile changes:'''
At two places in the TCL source code, an assignment is made while simultaneously performing a typecast. The typecast and the assignment had to be split into separate operations in order to be acceptable to the MinGW compilers.
=== Tk ===
Starting from the <tt>build</tt> directory, Tk can be built and installed as follows:
<pre>tar xzf ../sources/tk8.4.19-src.tar.gz
cd tk8.4.19/win
./configure --prefix=/c/swarm
make
make install</pre>
=== BLT ===
Starting from the <tt>build</tt> directory, BLT can be built and installed as follows:
<pre>tar xzf ../sources/BLT2.4z.tar.gz
cd blt2.4z
./configure --prefix=/c/swarm --without-x
make
make install</pre>
=== HDF5 (Optional) ===
Getting HDF5 to work with MinGW is a little tricky. It is an optional dependency, so if support for reading and writing <tt>.hdf</tt> files is not needed this section can be skipped.
As of version 1.8.7, HDF5 currently does not compile under MinGW. So, we must wrap pre-compiled binaries for use with MinGW. In order to wrap the binaries, we will need an additional tool called <tt>pexports</tt>. This can be installed using <tt>mingw-get</tt>:
<pre>mingw-get install mingw-utils</pre>
Download 32-bit Windows binaries from the HDF website compiled for use with the Visual Studio compilers (these files have &quot;VS&quot; listed under the ''Compilers'' section). After extracting the archive, the HDF5 libraries can be wrapped for use with MinGW by executing the following commands:
<pre>cd path/to/where/HDF5/was/extracted
for dll in `ls dll/*dll`; do
def_file=`basename $dll .dll`.def
lib_file=lib`basename $dll dll.dll`.a
pexports $dll &gt; $def_file
dlltool -d $def_file -l lib/$lib_file
done</pre>
Next, move the libraries and header files needed to use HDF5 from C into <tt>C:\swarm</tt>:
<pre>cp dll/hdf5dll.dll dll/szip.dll /c/swarm/bin
cp include/* /c/swarm/include
cp lib/libhdf5.a /c/swarm/lib</pre>
Finally, a patch must be applied to the HDF header file <tt>H5public.h</tt> so that it doesn't define <tt>ssize_t</tt>---a constant already defined by MinGW. The required patch is contained in the Swarm MinGW source archive:
<pre>cd /path/to/where/swarm/source/was/extracted
patch -p1 -d /c/swarm &lt; patches/hdf5-1.8.7-mingw.patch</pre>
== Build Swarm ==
Finally, the Swarm libraries themselves can be built. From the <tt>build</tt> directory, execute the following
<pre>tar xzf ../sources/swarm-2.4.1.tar.gz
cd swarm-2.4.1
patch -p1 ../../patches/swarm-2.4.1-mingw.patch
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm \
--with-zlibdir=/c/swarm \
--with-pngdir=/c/swarm \
--with-xpmdir=/c/swarm \
--with-ffidir=/c/swarm \
--with-tcl=/c/swarm/lib \
--with-tk=/c/swarm/lib \
--with-bltdir=/c/swarm
cd avcall
gcc -S avcall-i386.c
cd ..
make
make install</pre>
If you wrapped HDF5 up for use with MinGW, add <tt>--with-hdf5dir=/c/swarm</tt> to the list of arguments passed to <tt>configure</tt>.
'''Summary of patchfile changes:'''
<tt>swarm-2.4.1-mingw.patch</tt> modifies the Swarm source code in the following ways:
* <tt>gettimeofday</tt> is no longer defined in the Swarm sources as MinGW includes this function in its standard library.
* Swarm GUI functions are updated to be compatible with LibPNG 1.5.
* The Swarm <tt>configure</tt> script defines <tt>DATADIR</tt> as a preprocessor macro---this conflicts with variables in the GCC Objective-C library. <tt>DATDIR</tt> is <tt>undef</tt>ed in critical parts of the source code.
* The <tt>sleep</tt> function is aliased to <tt>usleep</tt>---which is the name of the MinGW implementation.
* The way in which Makefiles invoke <tt>gperf</tt> is amended so that it actually produces output.
* NULL checks are added to `zstrdup` in src/defobj/internal.m. Some functions in the Swarm library may attempt to call `zstrdup` on a NULL pointer. (This happens if the SWARMHOME environment variable is not set.) Failing to check for this condition can lead to segfaults. `zstrdup` now returns NULL if passed a NULL string or if `alloc` fails to allocate memory for a duplicate.
Full details are contained in the patchfile.
= Tools =
== MinGW ==
'''Homepage:''' http://www.mingw.org
'''Download Area:''' http://sourceforge.net/projects/mingw/files
'''Version Used:''' 20110530
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
[http://www.mingw.org MinGW] is a set of software that aims to provide an environment where software developed on UNIX-like systems can be easily compiled for Windows. Since Swarm is primarily developed on Linux (a UNIX clone), MinGW can ease the task of creating Swarm models that run on Windows.
MinGW is similar to the [http://www.cygwin.org Cygwin] project. The major difference is that MinGW produces executables that depend only on native Windows libraries while Cygwin executables require special compatibility libraries that are part of the Cygwin distribution.
=== Installing MinGW ===
MinGW can be installed by downloading the &quot;Automated MinGW Installer&quot;, which usually has a name like <tt>mingw-get-inst-&lt;date&gt;.exe</tt> where <tt>&lt;date&gt;</tt> is the datestamp for when the installer was packaged. Running this executable will start the installation process. The installer lets you select which optional components to install; make sure all boxes are checked so you '''install all components'''.
[[Image:MinGW_Setup.png|frame|none|alt=Install all available MinGW components]]
The installer downloads all components from the internet. This will take a while, so have a cup of coffee or walk the dog.
See the following section about also installing an optional, more-functional shell window for MinGW.
=== Using MinGW ===
The MinGW compilers are accessible through the &quot;MinGW Shell&quot; which should be located under the MinGW folder in the Start Menu:
[[Image:MinGW_Shell.png|frame|none|alt=Location of MinGW Shell]]
or by running <tt>C:\MinGW\msys\1.0\msys.bat</tt> (if MinGW was installed to its default location).
By default the MinGW shell executes inside of a Windows <tt>cmd.exe</tt> terminal. There are a couple major drawbacks to this:
* You cannot resize the window to full-screen.
* The shell provides limited history scrollback.
MinGW provides a couple of alternative terminals for the MinGW shell which do not have these drawbacks; one of which is called MinTTY. To install MinTTY execute the following in a MinGW shell:
<pre>mingw-get install mintty</pre>
Then the <tt>mintty</tt> command can be used to launch a MinTTY terminal. The MinGW Shell can also be set to launch MinTTY by default by editing the file <tt>C:\MinGW\msys\1.0\msys.bat</tt> and changing the following line (approximately line 58):
<pre>if &quot;x%MSYSCON%&quot; == &quot;xunknown&quot; set MSYSCON=sh.exe</pre>
to:
<pre>if &quot;x%MSYSCON%&quot; == &quot;xunknown&quot; set MSYSCON=mintty.exe</pre>
=== A Note About Paths ===
The MinGW Shell emulates a UNIX <tt>bash</tt> shell and thus uses UNIX-style paths, <tt>/path/to/file</tt>, instead of Windows-style paths, <tt>C:\path\to\file</tt>. One peculiarity of this process is that the shell must deal with the fact that Windows filesystems have multiple roots (<tt>C:</tt>, <tt>D:</tt>, etc.) while a UNIX filesystem only has one root called <tt>/</tt>. The way this is reconciled by the <tt>bash</tt> shell provided with MinGW is that <tt>/c</tt> refers to the root of the <tt>C:</tt> drive, <tt>/d</tt> refers to the root of the <tt>D:</tt> drive and so on and so forth.
The root of the filesystem itself, <tt>/</tt>, also has some caveats. <tt>/</tt> refers to the <tt>mysy</tt> folder, <tt>C:/MinGW/mysys/1.0</tt> in a default installation. <tt>/usr</tt> also refers to the same location. Thus, <tt>/usr/local</tt> and <tt>/local</tt> both refer to <tt>C:/MinGW/mysys/1.0/local</tt>.
=== A Note About MinGW-64 ===
Currently Swarm has been developed and tested against the 32-bit version of MinGW. Hence Swarm models produced this way should run in any version of Windows.
The [MinGW-w64][mingw_65] project produces 64-bit MinGW compilers that can produce 64-bit executables that will only run on 64-bit versions of Windows. These executables benefit from:
* Access to more memory. A 32-bit executable will only be able to allocate ~3 GB of RAM---even if the system has more RAM available.
* Possibly quicker execution speeds due to matching the native architecture of the operating system---however this depends on the types of tasks that the program executes. It has been reported that 64 bit Swarm executables run quicker than 32 bit Swarm executables on Linux.
Currently, no attempt has been made to compile Swarm 2.4.1 with the 64 bit MinGW compilers. If a successful attempt is made, please report it on the [http://www.swarm.org/mailman/listinfo/support Swarm mailing list].
== Emacs ==
'''Homepage:''' http://www.gnu.org/software/emacs
'''Version Used:''' 23.3
'''Download Area:''' http://ftp.gnu.org/gnu/emacs/windows
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GNU Emacs is a text editor that is used by many programmers to edit code. However, Emacs can also be scripted to perform a variety of complicated transformations on text files. The scripts that build the Swarm libraries use Emacs to automate the process of generating some source files. Thus Emacs has to be installed in order to build Swarm from source.
=== Installing Emacs ===
Install Emacs by downloading one of the <tt>emacs-&lt;version
number&gt;-bin-i386.zip</tt> files from the download area. Don't use any of the
files containing <tt>barebin</tt>. After extracting the ZIP archive there will
be an Emacs folder containing a subfolder called <tt>bin</tt>. Add this folder
to your Windows <tt>PATH</tt>. [[#RapidEE|RapidEE]] can help edit the
<tt>PATH</tt> variable.
== GPerf ==
'''Homepage:''' http://www.gnu.org/software/gperf/
'''Download Area:''' http://sourceforge.net/projects/gnuwin32/files/gperf
'''Version Used:''' 3.0.1
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GPerf is a program that produces C code containing hash functions. The scripts
that build the Swarm libraries use GPerf to generate some source code files.
Download <tt>gperf.exe</tt> from the GnuWin32 site on Sourceforge and place it
somewhere on your Windows <tt>PATH</tt>. Again, [[#RapidEE|RapidEE]] can help set the <tt>PATH</tt> variable.
== RapidEE ==
'''Homepage:''' http://www.rapidee.com
'''Version Used:''' 5.0
'''License:''' [http://www.rapidee.com/en/license Freeware]
The Rapid Environment Editor (RapidEE) is a spiffy tool that makes it easy to inspect and alter the value of Windows environment variables, such as the <tt>PATH</tt>. RapidEE may be used to edit &quot;System Variables&quot; which will affect all user accounts or &quot;User Variables&quot; which will affect just the current account. Administrative privileges may be required to edit the System Variables.
[[Image:RapidEE_1.png|frame|none|alt=The different variables RapidEE can edit]]
Right-clicking on the <tt>Path</tt> variable in the System Variables or User Variables will bring up a menu that presents the option to &quot;Add value&quot;:
[[Image:RapidEE_2.png|frame|none|alt=Adding a new value to the PATH]]
Once the new entry has been added, RapidEE must be told to save the changes. Command line shells, such as <tt>cmd.exe</tt>, must be restarted in order for them to notice the changes.
[[Image:RapidEE_3.png|frame|none|alt=Adding and saving a value]]
== Depends ==
'''Homepage:''' http://www.dependencywalker.com/
'''Version Used:''' 2.2
'''License:''' Freeware
Depends is a usefull utility that scans Windows executables and reports information concerning the Dynamic-link Libraries (DLLs) that those executables require in order to run.
= Software Used to Compile Swarm 2.4.1 =
{|
! Name
! Verson Used
! License
! Homepage
! Download Area
|-
| ZLib
| 1.2.5
| [http://www.opensource.org/licenses/Zlib ZLib/PNG License]
| [http://www.zlib.net http://www.zlib.net]
| --
|-
| LibFFI
| 3.0.9
| [http://www.opensource.org/licenses/MIT MIT]
| [http://sourceware.org/libffi http://sourceware.org/libffi]
| --
|-
| LibPNG
| 1.5.4
| [http://www.opensource.org/licenses/Zlib ZLib/PNG]
| [http://www.libpng.org/pub/png/libpng.html http://www.libpng.org/pub/png/libpng.html]
| --
|-
| XPM-NoX
| 4.2.0
| [http://www.opensource.org/licenses/MIT MIT]
| unknown
| [http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32 http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32]
|-
| Tcl
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| Tk
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| BLT
| 2.4z
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://blt.sourceforge.net http://blt.sourceforge.net]
| --
|-
| HDF5
| 1.8.7
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://www.hdfgroup.org/HDF5 http://www.hdfgroup.org/HDF5]
| --
|-
| Swarm
| 2.4.1
| [http://www.opensource.org/licenses/GPL-3.0 GPL]
| [http://www.swarm.org http://www.swarm.org]
| [http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
|}
11dfc36d4b95964fca61cf3db0a5c69cd285e3dc
8
2015-03-07T05:21:13Z
Pauljohn32
1
Created page with "= Overview = This documentation provides information on how to use Swarm on Windows with [http://www.mingw.org MinGW] compilers. The following topics will be covered: * How..."
wikitext
text/x-wiki
= Overview =
This documentation provides information on how to use Swarm on Windows with [http://www.mingw.org MinGW] compilers. The following topics will be covered:
* How to run a Swam model compiled with MinGW on Windows: Once you produce a Swarm model using MinGW (or someone gives one to you), how do you run it on other machines without installing Swarm there?
* How to use MinGW to compile your own Swarm models, either during model development or so you can distribute working models to others. This requires installing MinGW and our binary Swarm libraries.
* How to package a model compiled with MinGW so it can be installed and run by itself on Windows machines.
* How to use MinGW to compile the Swarm libraries, in case you want to build your own Swarm binaries.
Each topic is more difficult than the one before it. However the topics are independent in that it is not necessary to know how to compile the Swarm library in order to run a pre-compiled Swarm model or compile your own model against a pre-compiled version of Swarm.
= Using Swarm Models Compiled with MinGW =
A model that has been compiled using MinGW can be installed and run from a Windows computer without installing MinGW or Swarm. An example code is this build of Heatbugs:
[http://ftp.swarm.org/pub/swarm/src/testing/heatbugs-MinGW-win32.exe http://ftp.swarm.org/pub/swarm/src/testing/heatbugs-MinGW-win32.exe]
However, running a Swarm model requires some support programs and libraries. These are available as
<tt>swarm-2.4.1-win32.zip</tt>, available here:
[http://ftp.swarm.org/pub/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip http://ftp.swarm.org/pub/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip]
Unzipping that file will create a folder called <tt>swarm</tt> which should be moved somewhere that is easy to remember. The rest of this tutorial will assume this Swarm folder has been placed at <tt>C:\swarm</tt>.
Before a Swarm model can be run, the <tt>swarm\bin</tt> folder must be added to the Windows <tt>PATH</tt> so that Heatbugs can find necessary libraries when it runs. The <tt>swarm\bin</tt> folder can be ''temporarily'' added to the path by executing the following in the Windows command line (the command line is accessed using the program <tt>cmd.exe</tt>):
<pre>path=%PATH%;C:\swarm\bin</pre>
However, it is possible to have conflicts if other versions of libraries used by Swarm, such as HDF5, are already installed and in your path. And some Swarm programs require that the environment variable SWARMHOME be defined, which will typically not be true. These problems can be avoided by using the following statements instead of the above path command:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%</pre>
You can alternatively add the Swarm folder to your <tt>PATH</tt> permanently by editing the Windows PATH environment variable. A tool like [[#RapidEE|RapidEE]] makes doing so easy, or you can use use Windows control panel > System > Advanced > Environment Variables to add <tt>swarm\bin</tt> to the PATH system variable.
Once the path has been set to include the <tt>swarm\bin</tt> folder, Swarm models can be started through the Windows command line, or by double-clicking on them from the Windows Explorer.
The Heatbugs model can now be run by changing the directory of the command line to the folder holding <tt>heatbugs.exe</tt> and then executing the program. For example, if <tt>heatbugs.exe</tt> is located in <tt>C:\Users\example_user\Downloads</tt>, then the model may be run as follows:
<pre>cd C:\Users\example_user\Downloads
heatbugs.exe</pre>
(or you can just double-click on <tt>heatbugs.exe</tt> from Windows Explorer, which temporarily opens a Windows command terminal while the model runs.)
[[Image:Running_Heatbugs.png|frame|none|alt=Running the Heatbugs model]]
You can also create a simple Windows batch file that sets SWARMHOME and the path and then executes the model. Create a file called, for example <tt>heatbugs.bat</tt> in the same directory where <tt>heatbugs.exe</tt> is, containing these lines:
<pre>SWARMHOME=C:\swarm
path=%SWARMHOME%\bin;%PATH%
heatbugs.exe</pre>
Then, just double-clicking on <tt>heatbugs.bat</tt> will start the model.
If you try this and get an error that some .dll file is not found, then the problem is likely that the path is not set correctly to include the swarm\bin folder. If instead the program crashes without an error statement, then the problem is more likely that SWARMHOME needs to be set.
= Installing Swarm and MinGW to compile models =
To compile Swarm models from source using MinGW, the following simple steps need to be taken to set up the build environment:
* [[#MinGW|Install MinGW using instructions here]]. Currently only 32-bit MinGW can be used with Swarm. Install all components of MinGW.
* Download compiled Swarm binaries, archived as [http://ftp.swarm.org/pub/swarm/binaries/w32/MinGW/Swarm-2.4.1-win32.zip swarm-2.4.1-win32.zip]. Unzip the archive and place the extracted folder at <tt>C:\swarm</tt>.
'''NOTE:'''
The archived Swarm binaries '''MUST''' be placed at <tt>C:\swarm</tt> to successfully compile Swarm models. This is because some paths had to be hard-coded by <tt>libtool</tt> during the creation of the binaries.
The final step before you can compile a Swarm model is to set the <tt>SWARMHOME</tt> environment variable so that the "make" program knows where to find the Swarm libraries when compiling your code. There are several ways to do this.
*You can temporarily set SWARMHOME by entering this command in the MinGW shell: <pre>export SWARMHOME=/c/swarm</pre>
*You can edit your Makefile so it starts with: <pre>SWARMHOME=/c/swarm</pre>
*Set SWARMHOME permanently as a Windows environment variable, either by using [[#RapidEE|RapidEE]] or Windows control panel > System > Advanced > Environment Variables to add a new (User or System) variable called SWARMHOME with the value <tt>/c/swarm</tt>.
After MinGW has been installed and the Swarm binaries have been downloaded, Swarm models may be compiled using the MinGW shell. Start up the program MinGW Shell, cd to the directory containing your code and Makefile, and enter the command "Make".
An archive of official Swarm example programs can be downloaded from:
[http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
We will use the &quot;Heatbugs&quot; model as an example of how to compile a Swarm application:
<pre>tar xzf /path/to/downloaded/swarmapps-2.3.0.tar.gz
cd swarmapps-2.3.0/objc/heatbugs
make</pre>
'''VERY IMPORTANT NOTE: MinGW produces two executables called <tt>heatbugs.exe</tt>---one in the <tt>heatbugs</tt> folder and another in the <tt>heatbugs/.libs</tt> folder. You should ignore the executable in the top-level folder, <tt>heatbugs/heatbugs.exe</tt>, as it is merely a compiled wrapper script that executes <tt>heatbugs/.libs/heatbugs.exe</tt>. When distributing compiled models, only use binaries from the <tt>.libs</tt> folder.'''
The resulting executable, <tt>.libs/heatbugs.exe</tt> may be executing by following the steps described above at ''Using Swarm Models Compiled with MinGW''. These steps must include setting the Windows Path to include <tt>C:\swarm\bin</tt>.
= Distributing a Swarm Model for Windows Users =
A major benefit of the MinGW version of Swarm is that models can be distributed for people to use without installing Swarm. A simple way to do this, after the model has been compiled and tested using methods in the previous section, is to create a ZIP archive that contains all the files to run the model.
* Create a directory tree that includes the Swarm binary files. For example, create C:\MySwarmModel and add the Swarm binaries (as described [[Swarm_and_MinGW#Using_Swarm_Models_Compiled_with_MinGW|above]]) to it as a subdirectory tree.
* Create another subdirectory that includes just the compiled model.
* Create a third subdirectory that includes any input files that the model needs and a batch file that sets the path and executes the model.
* Zip the whole tree up for distribution.
The directory tree in the zip file looks like this:
<pre>
C:\MySwarmModel\swarm
\bin
\etc
\include
\lib
\man
\share
\executable\MySwarmModel.exe
\Runfiles\MySwarmModel.bat (and any input files)
</pre>
where the file <tt>MySwarmModel.bat</tt> contains:
<pre>
set SWARMHOME=C:\MySwarmModel\swarm
path=%SWARMHOME%\bin;%PATH%
C:\MySwarmModel\executable\MySwarmModel.exe
</pre>
Then users can run the model just by double-clicking on <tt>MySwarmModel.bat</tt>.
= Building Swarm Using MinGW =
This tutorial provides directions and code for compiling your own Swarm libraries for Windows. It is a bit advanced---some familiarity with compiling software from source in a Linux environment and knowledge of the UNIX command line is assumed.
== Install Required Tools ==
The first step is to download and install tools required for compiling Swarm. These links provide directions:
* [[#MinGW|MinGW]]
* [[#Emacs|Emacs]]
* [[#GPerf|GPerf]]
== Build Support Libraries ==
The next steps are to build and install the libraries that Swarm depends on. A ZIP archive containing all the source code required can be found at:
[http://ftp.swarm.org/pub/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip http://ftp.swarm.org/pub/swarm/src/swarm/Swarm-2.4.1-MinGW-sources.zip]
This archive contains two subdirectories:
* sources: This folder contains the source code for each component.
* patches: This folder contains patchfiles that modfy source code so that MinGW can compile it.
After downloading and extracting the source code archive, open up a MinGW shell and run the following commands:
<pre>cd /path/to/where/swarm/source/was/extracted
mkdir build</pre>
The following steps will all assume your MinGW shell is operating out of the <tt>build</tt> directory. All compiled software will be installed to <tt>/c/swarm</tt> (The Windows Explorer will see the folder appear at <tt>C:\swarm</tt>).
=== ZLib ===
ZLib will be the first library to be built as it is a common dependency for many of the other software components. From the <tt>build</tt> directory, execute the following to build Zlib:
<pre>tar xzf ../sources/zlib-1.2.5.tar.gz
cd zlib-1.2.5
make -f win32/Makefile.gcc</pre>
And then the following commands to install ZLib to <tt>/c/swarm</tt>:
<pre>mkdir -p /c/swarm/bin
mkdir -p /c/swarm/include
mkdir -p /c/swarm/lib
cp zlib1.dll /c/swarm/bin/
cp zconf.h zlib.h /c/swarm/include/
mv libzdll.a libz.dll.a
cp *.a /c/swarm/lib</pre>
=== LibPNG ===
LibPNG will be built next as its only dependency is ZLib. From the <tt>build</tt> directory, execute the following steps to build and install LibPNG:
<pre>tar xjf ../sources/libpng-1.5.4.tar.bz2
cd libpng-1.5.4
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm --with-zlib-prefix=/c/swarm
make
make install</pre>
=== XPM ===
Starting from the <tt>build</tt> directory, the XPM library can be built and installed as follows:
<pre>tar xjf ../sources/xpm-nox-4.2.0.tar.bz2
cd xpm-nox-4.2.0
patch -p1 &lt; ../../patches/xpm-nox-4.2.0-mingw-tcl.patch
make CC=gcc
make install prefix=/c/swarm</pre>
'''Summary of patchfile changes:'''
The patchfile is inherited from the SUSE builds of XPM for MinGW and adds Makefiles and other critical components.
One major modification has been made to the SUSE patchfile---<tt>tcl.h</tt> is included in <tt>xpm.h</tt>. This is required in order to use XPM while Tk is installed. Conversely, this means that this build of XPM cannot be used without having Tk installed.
=== LibFFI ===
Starting from the <tt>build</tt> directory, LibFFI can be built and installed as follows:
<pre>tar xzf ../sources/libffi-3.0.9.tar.gz
cd libffi-3.0.9
./configure --prefix=/c/swarm
make
make install</pre>
The LibFFI headers get installed in a weird place.
<pre>mv /c/swarm/lib/libffi-3.0.9/include/*.h /c/swarm/include
rm -rf /c/swarm/lib/libffi-3.0.9</pre>
=== Tcl ===
Starting from the <tt>build</tt> directory, Tcl can be built and installed as follows:
<pre>tar xzf ../sources/tcl8.4.19-src.tar.gz
cd tcl8.4.19
patch -p1 &lt; ../../patches/tcl-8.4.19-fix-lvalues.patch
cd win
./configure --prefix=/c/swarm
make
make install</pre>
'''Summary of patchfile changes:'''
At two places in the TCL source code, an assignment is made while simultaneously performing a typecast. The typecast and the assignment had to be split into separate operations in order to be acceptable to the MinGW compilers.
=== Tk ===
Starting from the <tt>build</tt> directory, Tk can be built and installed as follows:
<pre>tar xzf ../sources/tk8.4.19-src.tar.gz
cd tk8.4.19/win
./configure --prefix=/c/swarm
make
make install</pre>
=== BLT ===
Starting from the <tt>build</tt> directory, BLT can be built and installed as follows:
<pre>tar xzf ../sources/BLT2.4z.tar.gz
cd blt2.4z
./configure --prefix=/c/swarm --without-x
make
make install</pre>
=== HDF5 (Optional) ===
Getting HDF5 to work with MinGW is a little tricky. It is an optional dependency, so if support for reading and writing <tt>.hdf</tt> files is not needed this section can be skipped.
As of version 1.8.7, HDF5 currently does not compile under MinGW. So, we must wrap pre-compiled binaries for use with MinGW. In order to wrap the binaries, we will need an additional tool called <tt>pexports</tt>. This can be installed using <tt>mingw-get</tt>:
<pre>mingw-get install mingw-utils</pre>
Download 32-bit Windows binaries from the HDF website compiled for use with the Visual Studio compilers (these files have &quot;VS&quot; listed under the ''Compilers'' section). After extracting the archive, the HDF5 libraries can be wrapped for use with MinGW by executing the following commands:
<pre>cd path/to/where/HDF5/was/extracted
for dll in `ls dll/*dll`; do
def_file=`basename $dll .dll`.def
lib_file=lib`basename $dll dll.dll`.a
pexports $dll &gt; $def_file
dlltool -d $def_file -l lib/$lib_file
done</pre>
Next, move the libraries and header files needed to use HDF5 from C into <tt>C:\swarm</tt>:
<pre>cp dll/hdf5dll.dll dll/szip.dll /c/swarm/bin
cp include/* /c/swarm/include
cp lib/libhdf5.a /c/swarm/lib</pre>
Finally, a patch must be applied to the HDF header file <tt>H5public.h</tt> so that it doesn't define <tt>ssize_t</tt>---a constant already defined by MinGW. The required patch is contained in the Swarm MinGW source archive:
<pre>cd /path/to/where/swarm/source/was/extracted
patch -p1 -d /c/swarm &lt; patches/hdf5-1.8.7-mingw.patch</pre>
== Build Swarm ==
Finally, the Swarm libraries themselves can be built. From the <tt>build</tt> directory, execute the following
<pre>tar xzf ../sources/swarm-2.4.1.tar.gz
cd swarm-2.4.1
patch -p1 ../../patches/swarm-2.4.1-mingw.patch
export CPPFLAGS='-I/c/swarm/include'
export LDFLAGS='-L/c/swarm/lib'
./configure --prefix=/c/swarm \
--with-zlibdir=/c/swarm \
--with-pngdir=/c/swarm \
--with-xpmdir=/c/swarm \
--with-ffidir=/c/swarm \
--with-tcl=/c/swarm/lib \
--with-tk=/c/swarm/lib \
--with-bltdir=/c/swarm
cd avcall
gcc -S avcall-i386.c
cd ..
make
make install</pre>
If you wrapped HDF5 up for use with MinGW, add <tt>--with-hdf5dir=/c/swarm</tt> to the list of arguments passed to <tt>configure</tt>.
'''Summary of patchfile changes:'''
<tt>swarm-2.4.1-mingw.patch</tt> modifies the Swarm source code in the following ways:
* <tt>gettimeofday</tt> is no longer defined in the Swarm sources as MinGW includes this function in its standard library.
* Swarm GUI functions are updated to be compatible with LibPNG 1.5.
* The Swarm <tt>configure</tt> script defines <tt>DATADIR</tt> as a preprocessor macro---this conflicts with variables in the GCC Objective-C library. <tt>DATDIR</tt> is <tt>undef</tt>ed in critical parts of the source code.
* The <tt>sleep</tt> function is aliased to <tt>usleep</tt>---which is the name of the MinGW implementation.
* The way in which Makefiles invoke <tt>gperf</tt> is amended so that it actually produces output.
* NULL checks are added to `zstrdup` in src/defobj/internal.m. Some functions in the Swarm library may attempt to call `zstrdup` on a NULL pointer. (This happens if the SWARMHOME environment variable is not set.) Failing to check for this condition can lead to segfaults. `zstrdup` now returns NULL if passed a NULL string or if `alloc` fails to allocate memory for a duplicate.
Full details are contained in the patchfile.
= Tools =
== MinGW ==
'''Homepage:''' http://www.mingw.org
'''Download Area:''' http://sourceforge.net/projects/mingw/files
'''Version Used:''' 20110530
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
[http://www.mingw.org MinGW] is a set of software that aims to provide an environment where software developed on UNIX-like systems can be easily compiled for Windows. Since Swarm is primarily developed on Linux (a UNIX clone), MinGW can ease the task of creating Swarm models that run on Windows.
MinGW is similar to the [http://www.cygwin.org Cygwin] project. The major difference is that MinGW produces executables that depend only on native Windows libraries while Cygwin executables require special compatibility libraries that are part of the Cygwin distribution.
=== Installing MinGW ===
MinGW can be installed by downloading the &quot;Automated MinGW Installer&quot;, which usually has a name like <tt>mingw-get-inst-&lt;date&gt;.exe</tt> where <tt>&lt;date&gt;</tt> is the datestamp for when the installer was packaged. Running this executable will start the installation process. The installer lets you select which optional components to install; make sure all boxes are checked so you '''install all components'''.
[[Image:MinGW_Setup.png|frame|none|alt=Install all available MinGW components]]
The installer downloads all components from the internet. This will take a while, so have a cup of coffee or walk the dog.
See the following section about also installing an optional, more-functional shell window for MinGW.
=== Using MinGW ===
The MinGW compilers are accessible through the &quot;MinGW Shell&quot; which should be located under the MinGW folder in the Start Menu:
[[Image:MinGW_Shell.png|frame|none|alt=Location of MinGW Shell]]
or by running <tt>C:\MinGW\msys\1.0\msys.bat</tt> (if MinGW was installed to its default location).
By default the MinGW shell executes inside of a Windows <tt>cmd.exe</tt> terminal. There are a couple major drawbacks to this:
* You cannot resize the window to full-screen.
* The shell provides limited history scrollback.
MinGW provides a couple of alternative terminals for the MinGW shell which do not have these drawbacks; one of which is called MinTTY. To install MinTTY execute the following in a MinGW shell:
<pre>mingw-get install mintty</pre>
Then the <tt>mintty</tt> command can be used to launch a MinTTY terminal. The MinGW Shell can also be set to launch MinTTY by default by editing the file <tt>C:\MinGW\msys\1.0\msys.bat</tt> and changing the following line (approximately line 58):
<pre>if &quot;x%MSYSCON%&quot; == &quot;xunknown&quot; set MSYSCON=sh.exe</pre>
to:
<pre>if &quot;x%MSYSCON%&quot; == &quot;xunknown&quot; set MSYSCON=mintty.exe</pre>
=== A Note About Paths ===
The MinGW Shell emulates a UNIX <tt>bash</tt> shell and thus uses UNIX-style paths, <tt>/path/to/file</tt>, instead of Windows-style paths, <tt>C:\path\to\file</tt>. One peculiarity of this process is that the shell must deal with the fact that Windows filesystems have multiple roots (<tt>C:</tt>, <tt>D:</tt>, etc.) while a UNIX filesystem only has one root called <tt>/</tt>. The way this is reconciled by the <tt>bash</tt> shell provided with MinGW is that <tt>/c</tt> refers to the root of the <tt>C:</tt> drive, <tt>/d</tt> refers to the root of the <tt>D:</tt> drive and so on and so forth.
The root of the filesystem itself, <tt>/</tt>, also has some caveats. <tt>/</tt> refers to the <tt>mysy</tt> folder, <tt>C:/MinGW/mysys/1.0</tt> in a default installation. <tt>/usr</tt> also refers to the same location. Thus, <tt>/usr/local</tt> and <tt>/local</tt> both refer to <tt>C:/MinGW/mysys/1.0/local</tt>.
=== A Note About MinGW-64 ===
Currently Swarm has been developed and tested against the 32-bit version of MinGW. Hence Swarm models produced this way should run in any version of Windows.
The [MinGW-w64][mingw_65] project produces 64-bit MinGW compilers that can produce 64-bit executables that will only run on 64-bit versions of Windows. These executables benefit from:
* Access to more memory. A 32-bit executable will only be able to allocate ~3 GB of RAM---even if the system has more RAM available.
* Possibly quicker execution speeds due to matching the native architecture of the operating system---however this depends on the types of tasks that the program executes. It has been reported that 64 bit Swarm executables run quicker than 32 bit Swarm executables on Linux.
Currently, no attempt has been made to compile Swarm 2.4.1 with the 64 bit MinGW compilers. If a successful attempt is made, please report it on the [http://www.swarm.org/mailman/listinfo/support Swarm mailing list].
== Emacs ==
'''Homepage:''' http://www.gnu.org/software/emacs
'''Version Used:''' 23.3
'''Download Area:''' http://ftp.gnu.org/gnu/emacs/windows
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GNU Emacs is a text editor that is used by many programmers to edit code. However, Emacs can also be scripted to perform a variety of complicated transformations on text files. The scripts that build the Swarm libraries use Emacs to automate the process of generating some source files. Thus Emacs has to be installed in order to build Swarm from source.
=== Installing Emacs ===
Install Emacs by downloading one of the <tt>emacs-&lt;version
number&gt;-bin-i386.zip</tt> files from the download area. Don't use any of the
files containing <tt>barebin</tt>. After extracting the ZIP archive there will
be an Emacs folder containing a subfolder called <tt>bin</tt>. Add this folder
to your Windows <tt>PATH</tt>. [[#RapidEE|RapidEE]] can help edit the
<tt>PATH</tt> variable.
== GPerf ==
'''Homepage:''' http://www.gnu.org/software/gperf/
'''Download Area:''' http://sourceforge.net/projects/gnuwin32/files/gperf
'''Version Used:''' 3.0.1
'''License:''' [http://www.opensource.org/licenses/GPL-3.0 GPL]
GPerf is a program that produces C code containing hash functions. The scripts
that build the Swarm libraries use GPerf to generate some source code files.
Download <tt>gperf.exe</tt> from the GnuWin32 site on Sourceforge and place it
somewhere on your Windows <tt>PATH</tt>. Again, [[#RapidEE|RapidEE]] can help set the <tt>PATH</tt> variable.
== RapidEE ==
'''Homepage:''' http://www.rapidee.com
'''Version Used:''' 5.0
'''License:''' [http://www.rapidee.com/en/license Freeware]
The Rapid Environment Editor (RapidEE) is a spiffy tool that makes it easy to inspect and alter the value of Windows environment variables, such as the <tt>PATH</tt>. RapidEE may be used to edit &quot;System Variables&quot; which will affect all user accounts or &quot;User Variables&quot; which will affect just the current account. Administrative privileges may be required to edit the System Variables.
[[Image:RapidEE_1.png|frame|none|alt=The different variables RapidEE can edit]]
Right-clicking on the <tt>Path</tt> variable in the System Variables or User Variables will bring up a menu that presents the option to &quot;Add value&quot;:
[[Image:RapidEE_2.png|frame|none|alt=Adding a new value to the PATH]]
Once the new entry has been added, RapidEE must be told to save the changes. Command line shells, such as <tt>cmd.exe</tt>, must be restarted in order for them to notice the changes.
[[Image:RapidEE_3.png|frame|none|alt=Adding and saving a value]]
== Depends ==
'''Homepage:''' http://www.dependencywalker.com/
'''Version Used:''' 2.2
'''License:''' Freeware
Depends is a usefull utility that scans Windows executables and reports information concerning the Dynamic-link Libraries (DLLs) that those executables require in order to run.
= Software Used to Compile Swarm 2.4.1 =
{|
! Name
! Verson Used
! License
! Homepage
! Download Area
|-
| ZLib
| 1.2.5
| [http://www.opensource.org/licenses/Zlib ZLib/PNG License]
| [http://www.zlib.net http://www.zlib.net]
| --
|-
| LibFFI
| 3.0.9
| [http://www.opensource.org/licenses/MIT MIT]
| [http://sourceware.org/libffi http://sourceware.org/libffi]
| --
|-
| LibPNG
| 1.5.4
| [http://www.opensource.org/licenses/Zlib ZLib/PNG]
| [http://www.libpng.org/pub/png/libpng.html http://www.libpng.org/pub/png/libpng.html]
| --
|-
| XPM-NoX
| 4.2.0
| [http://www.opensource.org/licenses/MIT MIT]
| unknown
| [http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32 http://build.opensuse.org/package/files?package=mingw32-xpm-nox&project=windows%3Amingw%3Awin32]
|-
| Tcl
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| Tk
| 8.4.19
| [http://www.tcl.tk/software/tcltk/license.html Tcl]
| [http://www.tcl.tk http://www.tcl.tk]
| --
|-
| BLT
| 2.4z
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://blt.sourceforge.net http://blt.sourceforge.net]
| --
|-
| HDF5
| 1.8.7
| [http://www.opensource.org/licenses/BSD-3-Clause BSD]
| [http://www.hdfgroup.org/HDF5 http://www.hdfgroup.org/HDF5]
| --
|-
| Swarm
| 2.4.1
| [http://www.opensource.org/licenses/GPL-3.0 GPL]
| [http://www.swarm.org http://www.swarm.org]
| [http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz http://ftp.swarm.org/pub/swarm/src/swarm/swarmapps-2.3.0.tar.gz]
|}
c05f32cf9675551a84dd4bde3faa41f5f3f5526b
Swarm main page
0
6
2205
2202
2016-06-09T21:09:50Z
SRogers
8
wikitext
text/x-wiki
Swarm is a platform for agent-based models (ABMs) that includes:
* A conceptual framework for designing, describing, and conducting experiments on ABMs;
* Software implementing that framework and providing many handy tools; and
* A community of users and developers that share ideas, software, and experience.
Swarm materials are organized in three categories, each with its own main page on this wiki: [[Swarm:_software_main_page|Software]], [[Swarm:_documentation_main_page|Documentation and learning materials]], and [[Swarm:_applications_and_user_contributions_main_page|example applications and contributed code]].
==Getting started if you are new to Swarm==
First, see this [[Introduction_to_Swarm|short introduction]].
Next, it is important to develop an understanding of Swarm's conceptual framework: how you organize and describe a model using concepts such as swarms, collections, actions, schedules, observers, etc. The original Santa Fe Institute [[Image:MinarEtAl96.pdf|working paper describing Swarm]] is a good way to learn Swarm's basic structure and motivation. The [[Swarm:_documentation_main_page|Documentation and learning materials]] page provides additional reading that is essential before trying to start using the software (even---especially---if you are an experienced programmer).
Finally, you will want to install Swarm software and use its documentation and examples to learn how to implement your models. (You might first want to visit the wiki's [[Main_Page#Agent-_and_Individual-based_Modeling_Resources|ABM resources section]] to see if there are other software platforms to consider.) To get started with the software (including deciding whether to use Swarm with Java or Objective-C), go to the [[Swarm:_software_main_page|main page for Swarm software]].
==Getting Swarm software and documentation==
See the [[Swarm:_software_main_page|software page]] for information on Swarm software. To download the current version, go to the [[Swarm: stable release|stable release page]].
See the [[Swarm:_documentation_main_page|documentation page]] for the Swarm reference manual, users guide, and other materials.
Our download site for Swarm software (source, example applications, documentation, packages) is http://download.savannah.gnu.org/releases/swarm/
==Finding example Swarm applications==
Hundreds of models have been built with Swarm. To see, download, and try some examples (along with additions to Swarm contributed by users), see the [[Swarm:_applications_and_user_contributions_main_page|example applications and contributed code]].
==Getting modeling and Swarm software user support==
User support is obtained by joining the [[Swarm:_Mailing_lists|Swarm email lists]]. The swarm modelling list is for discussion and questions about agent-based modeling in general. The swarm support list is where your questions about Swarm software are likely to be answered by one of your many generous fellow users.
==Numbering convention==
Swarm is divided into three main pieces: source, documentation, and applications. They are each bestowed version numbers that are independently increased except for major releases of the source. The version map right now is:
source: 2.2
docs: 2.2
apps: 2.1.1 (being updated)
heatbugs: 2.1.1
template: 2.1.1
market: 2.1.1
mousetrap: 2.1.1
tutorial: 2.1.1
hello-world: 2.1.1
==Frequently Asked Questions==
Check the [[Swarm_FAQ| Swarm FAQ]] to see if your question has already been answered.
<!--==Snapshots vs CVS==
COMMENTED OUT BECAUSE I THINK IT'S OUT OF DATE. --[[User:SFRailsback|SFRailsback]] 16:47, 27 Jan 2006 (EST)
Only snapshots of the source section are available. The docs and apps are only available from the CVS.
The CVS code for apps should build and run without problems and is the best way to get example applications.
The code for the docs is mainly a document generating system, which produces documentation from comments in the source code. It is only usable by those with a good understanding of SGML/XML in general and DocBook in particular. If that is not you leave it alone.-->
__NOEDITSECTION__
5afeba61185e82a1ea68b3e5b616e82bb337711e
2202
15
2016-06-09T20:40:34Z
SRogers
8
wikitext
text/x-wiki
Swarm is a platform for agent-based models (ABMs) that includes:
* A conceptual framework for designing, describing, and conducting experiments on ABMs;
* Software implementing that framework and providing many handy tools; and
* A community of users and developers that share ideas, software, and experience.
Swarm materials are organized in three categories, each with its own main page on this wiki: [[Swarm:_software_main_page|Software]], [[Swarm:_documentation_main_page|Documentation and learning materials]], and [[Swarm:_applications_and_user_contributions_main_page|example applications and contributed code]].
==Getting started if you are new to Swarm==
First, see this [[Introduction_to_Swarm|short introduction]].
Next, it is important to develop an understanding of Swarm's conceptual framework: how you organize and describe a model using concepts such as swarms, collections, actions, schedules, observers, etc. The original Santa Fe Institute [[Image:MinarEtAl96.pdf|working paper describing Swarm]] is a good way to learn Swarm's basic structure and motivation. The [[Swarm:_documentation_main_page|Documentation and learning materials]] page provides additional reading that is essential before trying to start using the software (even---especially---if you are an experienced programmer).
Finally, you will want to install Swarm software and use its documentation and examples to learn how to implement your models. (You might first want to visit the wiki's [[Main_Page#Agent-_and_Individual-based_Modeling_Resources|ABM resources section]] to see if there are other software platforms to consider.) To get started with the software (including deciding whether to use Swarm with Java or Objective-C), go to the [[Swarm:_software_main_page|main page for Swarm software]].
==Getting Swarm software and documentation==
See the [[Swarm:_software_main_page|software page]] for information on Swarm software. To download the current version, go to the [[Swarm: stable release|stable release page]].
See the [[Swarm:_documentation_main_page|documentation page]] for the Swarm reference manual, users guide, and other materials.
Our download site for Swarm software (source, example applications, documentation, packages) is http://download.savannah.gnu.org/releases/swarm/
==Finding example Swarm applications==
Hundreds of models have been built with Swarm. To see, download, and try some examples (along with additions to Swarm contributed by users), see the [[Swarm:_applications_and_user_contributions_main_page|example applications and contributed code]].
==Getting modeling and Swarm software user support==
User support is obtained by joining the [[Swarm:_Mailing_lists|Swarm email lists]]. The swarm modelling list is for discussion and questions about agent-based modeling in general. The swarm support list is where your questions about Swarm software are likely to be answered by one of your many generous fellow users.
==Numbering convention==
Swarm is divided into three main pieces: source, documentation, and applications. They are each bestowed version numbers that are independently increased except for major releases of the source. The version map right now is:
source: 2.2
docs: 2.2
apps: 2.1.1 (being updated)
heatbugs: 2.1.1
template: 2.1.1
market: 2.1.1
mousetrap: 2.1.1
tutorial: 2.1.1
hello-world: 2.1.1
<!--==Snapshots vs CVS==
COMMENTED OUT BECAUSE I THINK IT'S OUT OF DATE. --[[User:SFRailsback|SFRailsback]] 16:47, 27 Jan 2006 (EST)
Only snapshots of the source section are available. The docs and apps are only available from the CVS.
The CVS code for apps should build and run without problems and is the best way to get example applications.
The code for the docs is mainly a document generating system, which produces documentation from comments in the source code. It is only usable by those with a good understanding of SGML/XML in general and DocBook in particular. If that is not you leave it alone.-->
__NOEDITSECTION__
0431ef85fc5a6a2f7e029ceaec5fa464b424da09
15
2015-03-07T05:44:06Z
Pauljohn32
1
Created page with "Swarm is a platform for agent-based models (ABMs) that includes: * A conceptual framework for designing, describing, and conducting experiments on ABMs; * Software implementi..."
wikitext
text/x-wiki
Swarm is a platform for agent-based models (ABMs) that includes:
* A conceptual framework for designing, describing, and conducting experiments on ABMs;
* Software implementing that framework and providing many handy tools; and
* A community of users and developers that share ideas, software, and experience.
Swarm materials are organized in three categories, each with its own main page on this wiki: [[Swarm:_software_main_page|Software]], [[Swarm:_documentation_main_page|Documentation and learning materials]], and [[Swarm:_applications_and_user_contributions_main_page|example applications and contributed code]].
==Getting started if you are new to Swarm==
First, see this [[Introduction_to_Swarm|short introduction]].
Next, it is important to develop an understanding of Swarm's conceptual framework: how you organize and describe a model using concepts such as swarms, collections, actions, schedules, observers, etc. The original Santa Fe Institute [[Image:MinarEtAl96.pdf|working paper describing Swarm]] is a good way to learn Swarm's basic structure and motivation. The [[Swarm:_documentation_main_page|Documentation and learning materials]] page provides additional reading that is essential before trying to start using the software (even---especially---if you are an experienced programmer).
Finally, you will want to install Swarm software and use its documentation and examples to learn how to implement your models. (You might first want to visit the wiki's [[Main_Page#Agent-_and_Individual-based_Modeling_Resources|ABM resources section]] to see if there are other software platforms to consider.) To get started with the software (including deciding whether to use Swarm with Java or Objective-C), go to the [[Swarm:_software_main_page|main page for Swarm software]].
==Getting Swarm software and documentation==
See the [[Swarm:_software_main_page|software page]] for information on Swarm software. To download the current version, go to the [[Swarm: stable release|stable release page]].
See the [[Swarm:_documentation_main_page|documentation page]] for the Swarm reference manual, users guide, and other materials.
Our download site for Swarm software (source, example applications, documentation, packages) is http://ftp.swarm.org/pub/swarm
==Finding example Swarm applications==
Hundreds of models have been built with Swarm. To see, download, and try some examples (along with additions to Swarm contributed by users), see the [[Swarm:_applications_and_user_contributions_main_page|example applications and contributed code]].
==Getting modeling and Swarm software user support==
User support is obtained by joining the [[Swarm:_Mailing_lists|Swarm email lists]]. The swarm modelling list is for discussion and questions about agent-based modeling in general. The swarm support list is where your questions about Swarm software are likely to be answered by one of your many generous fellow users.
==Numbering convention==
Swarm is divided into three main pieces: source, documentation, and applications. They are each bestowed version numbers that are independently increased except for major releases of the source. The version map right now is:
source: 2.2
docs: 2.2
apps: 2.1.1 (being updated)
heatbugs: 2.1.1
template: 2.1.1
market: 2.1.1
mousetrap: 2.1.1
tutorial: 2.1.1
hello-world: 2.1.1
<!--==Snapshots vs CVS==
COMMENTED OUT BECAUSE I THINK IT'S OUT OF DATE. --[[User:SFRailsback|SFRailsback]] 16:47, 27 Jan 2006 (EST)
Only snapshots of the source section are available. The docs and apps are only available from the CVS.
The CVS code for apps should build and run without problems and is the best way to get example applications.
The code for the docs is mainly a document generating system, which produces documentation from comments in the source code. It is only usable by those with a good understanding of SGML/XML in general and DocBook in particular. If that is not you leave it alone.-->
__NOEDITSECTION__
13170fe6703a7c7a0c1d46ac1bfee915a004e300
Windows binary notes
0
1649
2155
2015-12-02T22:42:28Z
SwarmWikiSysop
5
Created page with "{{SwarmFAQ}} '''This page refers to Swarm 2.2 in Cygwin; we now strongly recommend instead using Swarm in Windows via the MinGW compiler. See Swarm_and_MinGW|the MinGW rele..."
wikitext
text/x-wiki
{{SwarmFAQ}}
'''This page refers to Swarm 2.2 in Cygwin; we now strongly recommend instead using Swarm in Windows via the MinGW compiler. See [[Swarm_and_MinGW|the MinGW release page]].'''
==Q: How do I install the Windows binary distribution of Objective-C Swarm-2.2?==
A: Is in several parts, below. Note that Java Swarm 2.2 no longer requires Cygwin, only a simple download (see the [[Swarm:_stable_release|stable release page]]).
===Windows-specific differences from Swarm-2.1.1===
Unlike the previous stable version of Swarm, version 2.2 runs reliably under Windows XP. Objective-C users may notice less of an execution speed penalty for running in Windows, compared to Linux, depending on the application. If you were an Objective-C user of Swarm-2.1.1, you will notice that Version 2.2 uses a new Obj-C compiler that behaves differently in minor ways. For example, it produces more output while linking (just where you would get fatal error messages in the old compiler), and it may balk (or give warning messages) at minor programming faux pas that the previous compiler ignored.
===Changes in how Objective-C Swarm Windows binaries are distributed===
For Windows, Objective-C Swarm works within the Unix-like environment provided by Cygwin (http://www.cygwin.com). However, the approach to installing Cygwin and Swarm has changed. Version 2.1.1 (and earlier stable Windows distributions) included Cygwin in the Swarm distribution, so installing Swarm also installed Cygwin. Then, in the development versions preceding 2.2, it was necessary to first install Cygwin, then install Swarm within Cygwin.
With Version 2.2, we are now including Swarm as a package within a special Cygwin distribution. (Swarm is *not*, and probably never will be, distributed by Cygwin as a part of their standard distributions.) You should not install Cygwin separately first; instead, just use the Swarm-specific Cygwin setup program we provide.
Note that the Cygwin distributed with Swarm-2.2 is the version of Cygwin that was current as of December, 2004. We do not plan to update our distribution to keep current with future changes in Cygwin. If you want to update your Cygwin in the future, you can do so from the Cygwin site but you will be responsible for any effects it has on Swarm.
The Cygwin setup program lets you select which packages to install. Cygwin distributes a wide variety of packages that do many different things, most of which are not used by Swarm, and the complete distribution is very large. If you follow the default selections during setup, you will get a version of Cygwin that includes everything you need to run Swarm and do other basic things, but many of the unrelated optional packages will not be installed. Using the default setup, you should end up with about 135 megabytes of installed code.
===How to distribute Swarm-2.2 Windows binaries yourself===
Sometimes it is desirable to put Swarm on a CD so you can distribute it yourself, for example so your clients can install and run your model. Unfortunately, we are still without a simple, reliable way to do this with Objective-C Swarm 2.2.
Among the setup program's options is the ability to download the install files from the internet to a local directory, then install from the local directory. This seems like a good way to distribute Swarm-2.2: download the install files and put them and the setup program on a CD, so others can install from the CD. '''HOWEVER''' there apparently is a bug in the Cygwin setup program that can keep this from working: you may be able to install from a local directory (CD or hard disk) but then Cygwin may not work. Only the setup program's option to install from the internet seems to be reliable.
The only option currently available is collection of packages that Pietro Terna developed to install Cygwin separately, then install Swarm within Cygwin. The files and information are at http://eco83.econ.unito.it/swarm/materiale/cd/ : look at the readme.txt file. This distribution contains also other useful things. Pietro has even very kindly been distributing CDs upon request.
===Installing the Windows binaries===
#Uninstall any previous versions of Cygwin or Swarm. For previous installations of Cygwin, just delete all its files.
#Execute (directly, or after first downloading it) the Swarm-specific Cygwin setup program, which is here: http://ftp.swarm.org/pub/swarm/binaries/w32/cygwin/setup.exe
#Select the download source as "Install from internet".
#When this setup program asks you which site to download from, select "ftp.swarm.org".
#If in doubt, just hit "Next" for all other selections. A window lets you select which components of Cygwin you want to install; it is safest to just hit "Next" and not change anything.
#One of the setup options is whether to use Unix or Windows file types. Unix and Windows have different line end characters in ASCII files, and this option determines which type your Swarm model will expect and produce. If you choose Unix, your Swarm code will expect input files to be in Unix format and will not be able to read files generated by Windows applications like Excel. (Cygwin includes the two utilities "dos2unix" and "unix2dos" that convert files, but be aware that these utilities will ruin your executable files if they attempt to convert them.)
===Setting SWARMHOME===
In Version 2.2, the environment variable SWARMHOME should be set to "/usr".
You can set it in your makefile, or you can temporarily set SWARMHOME from the Cygwin terminal window by entering:
export SWARMHOME=/usr
Or you can permanently set SWARMHOME by (a) going to the Windows control panel and opening the System window; (b) clicking on the "Advanced" tab in the System window; (c) clicking on the "Environment variables" button; (d) in the "User variables" window, create a new environment variable called SWARMHOME with the value:
C:\Cygwin\usr
Or you can permanently set SWARMHOME by creating a file named ".bashrc" that includes at least these two lines:
#!/bin/bash
export SWARMHOME=/usr
Save the file in your Cygwin home directory.
Note: Your Cygwin home directory is the directory that Cygwin starts up in. It usually is:
C:\Documents and Settings\(your user name).
Or, sometimes:
c:\cygwin\home\(your user name).
===Uninstalling Swarm and Cygwin===
Cygwin does not come with an uninstaller; it must be manually uninstalled. Briefly, that means deleting all its files and then manually removing any entries related to Cygwin in the Windows registry (via the command-line program "regedit"). There are instructions in the Cygwin site's FAQ.
===More information===
Pietro Terna's instructions for installing the pre-release of Swarm-2.2 are not completely accurate for this stable release but they still provide useful information on topics such as using the Cygwin setup program and creating a .bashrc file. See "instructions.pdf" at http://eco83.econ.unito.it/swarm/materiale/cd/swarm_2.2_cd/
Additional information on Cygwin is at: http://www.cygwin.com/
2ce4f170419cf14cde492f0f75b4c478956076d8
Talk:AdahAcord956
1
276
291
2015-10-17T15:20:27Z
188.186.82.167
0
Your www.swarm.org - gut potal
wikitext
text/x-wiki
Excusez, j'ai pensГ© et a Г©loignГ© cette phrase
<a href="http://www.divx.pw/search.php?search=xxxxxxxvdobf&action=search">chayquanEl </a>
69a41b24dca0122e73928533c015bfc58a5c7e4d
Talk:Main Page
1
19
33
2015-10-06T13:31:56Z
91.200.12.71
0
E: dose, pupil's undiagnosed, irreplaceable, amblyopia, haematopoiesis.
wikitext
text/x-wiki
http://dapoxetinepriligy-buy.org/ - Dapoxetine With Sildenafil <a href="http://hyclatedoxycycline-buy.com/">Doxycycline</a> http://lasix-onlinefurosemide.com/
fe79891f7e03ea0225520bccf724af51d7ce21b9
Talk:PomeroyCamacho424
1
281
296
2015-10-17T15:38:06Z
188.186.82.167
0
Your www.swarm.org - nice website
wikitext
text/x-wiki
Mi dispiace, ma, a mio parere, si sono errati. Sono in grado di provarlo.
<a href="http://vb.7btin.org/showthread.php?p=299110#post299110">shuvaiEl </a>
2b2c63155e67b6b3ddc7809cbe7c17c7bf9b0746
Talk:SwarmWiki:Objectives and organization
1
15
28
2015-10-04T03:03:52Z
91.200.12.71
0
Aristotle's constructed years: renally tri-iodothyronine heparin, marijuana.
wikitext
text/x-wiki
http:/// - <a href="http:///"></a> http:///
d9c5bd3bfe23c1bab7e820b7572f08b86a176269
Talk:TherrienCutright504
1
593
608
2015-10-23T12:39:18Z
188.186.55.111
0
Your www.swarm.org - awesome resource
wikitext
text/x-wiki
Je pense que vous vous trompez. Nous examinerons cela.
<a href="http://is.gd/CQQljP">mathiasEl </a>
b5666a72294bbd88db0e2f27f3e65db109182b56
User:94.190.63.204
2
20
35
2015-10-11T00:59:52Z
94.190.63.204
0
did the cost of viagra go up
wikitext
text/x-wiki
the parties are currently working on generic discovery and are expected to select a small group of lawsuit to undergo case-specific discovery this year. according to a case management order (pdf) issued in october 2013, a series of six cases will be eligible for early trial dates in the litigation, including three cases that will be selected by each side before april 1, 2014. core case-specific discovery will be completed on those cases between may and august 1, with each party suggesting one case to the court for the first bellwether trial by september 1, 2014. therefore, the first trials could begin by the end of this year, or in early 2015 if a tylenol settlement agreement is not reached before then.
@opgopg@
ab2ef2569d43fa743cbbb6c1157def51070acfed
User:Gepr
2
1661
2240
2215
2024-05-07T15:37:28Z
Gepr
9
add email address
wikitext
text/x-wiki
Glen E Ropella
[mailto:gepr-AT-swarm.org]
0c3ee411b6d37b50056e3f4f82630ac7bf79fcea
2215
2020-06-08T23:26:54Z
Gepr
9
Add my page
wikitext
text/x-wiki
Glen E Ropella
9988b0748cba9a1bd4f3a96ef3411d39dcab4830
User:MMorini
2
1665
2243
2024-05-07T16:31:14Z
MMorini
6
Created blank page
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
User:SRogers
2
1657
2189
2016-06-06T16:29:02Z
SRogers
8
Created page with "Steve Rogers is a polyglot programmer working mostly in C/C++, Java, and Python. He has degrees in Physics and Industrial Engineering and spent 20 years as a software engineer..."
wikitext
text/x-wiki
Steve Rogers is a polyglot programmer working mostly in C/C++, Java, and Python. He has degrees in Physics and Industrial Engineering and spent 20 years as a software engineer automating factories word wide. He is interested in Complex Adaptive Systems, their modeling and simulation. In addition to Swarm, he has simulation experience with SLAM, SimPy, and Mesa.
LinkedIn profile: https://www.linkedin.com/in/shrogers
2d6597549cd8f25c3915e3932a478e955f6c285a
User talk:204.195.139.6
3
1648
1672
2015-11-03T15:15:29Z
204.195.139.6
0
fantastic site this is exactly what I washoping to find
wikitext
text/x-wiki
My name is Leeya Thanks for sharing highly specialized topics. The treasure trove is positively a huge scores and is going to speed up things for me with my projects. I'm absolutely pleased by the talent that everybody on this spot. It reveals how beyond measure everybody mastered branches of knowledge. I saved a link to this index and will come back for trending articles. You my pals are the top very talented. I discovered the information that I had already looked everywhere and just couldn't find. This is a great website. In my spare time I am always studying the <a href=http://www.gotwebsiteandflyers.com/index-3.html>top seo company in phoenix</a> It is unique thing because it helps to move your business climb to the first page of the search results on altanta vista and causes more members to register which will increase the technical foundation. we would like to offer a hearty thanks for the time you have contributed in writing this website. In fact, your creative writing skills has encouraged me to create our own website. Really directory marketing is becoming more and more known to lots people rapidly in the last years. My brother is also very interested into this when they are not checking out <a href=https://elitesportsadvisor.com/?page_id=3670> tennis betting blog</a> Well, I hope to begin some interesting topics with you all soon.
c00c2f296c8dafd240a8059156c163adf27bfb80
Swarm:Applications and user contributions main page
4
12
24
2015-03-07T06:14:30Z
Pauljohn32
1
Created page with " We make a wide variety of Swarm models available. These illustrate the many different kinds of research questions addressed using agent-based models, and provide example ide..."
wikitext
text/x-wiki
We make a wide variety of Swarm models available. These illustrate the many different kinds of research questions addressed using agent-based models, and provide example ideas and software for other modelers.
==Demo page==
For newcomers, [[Examples_of_Swarm_applications|here is a peek at a couple of classic Swarm applications]].
==How to choose and run example applications==
(For a discussion of Java vs. Objective-C, see the FAQ: [[Swarm_FAQ]])
===Objective-C applications===
Listed below are sites where you can download Objective-C Swarm models. To run them:
*Download and un-zip the archive. The archives are usually in TAR GZIP format (e.g., HeatBugs.tar.gz), which you can unzip (in a Linux terminal window or, if using Windows, in Cygwin) by typing "tar xzvf HeatBugs.tar.gz".
*Change directories into the newly unzipped directory of source code (in a Linux terminal window or, if using Windows, in Cygwin).
*If your Swarm installation is set up correctly, you can then compile the application by simply typing "make". (If you get a message something like "Makefile: ... /Makefile.appl: No such file or directory..." then you do not have the environment variable SWARMHOME set correctly. Keep reading...)
*If compilation is successful, you will have a new executable file (e.g., "heatbugs.exe" in Windows; "heatbugs" in Linux). Then you can start the model by typing "./heatbugs.exe" (or, in Linux, "./heatbugs").
*A common problem is not having your system's SWARMHOME environment variable correctly pointed to the location of your Swarm installation. SWARMHOME should typically be /usr/local/ or /usr/ if you've installed it from a binary package on a GNU/Linux system. For Windows, see [[Windows_binary_notes]]
===Java applications===
We provide step-by-step [[instructions]] for compiling and running the Java program Jheatbugs-3.0 on Windows XP using Swarm 2.2. Our demo covers interactive (visual) mode as well as batch mode (multiple runs with output to files).
Other Java Swarm models are listed below.
==Official applications archive==
Our official archive of Swarm applications is at http://ftp.swarm.org/pub/swarm/apps/. Even though these models are generally old, many of them still work in Swarm 2.2. There are far more Objective-C than Java applications in the archive.
The archive includes Java versions of the Swarm classics heatbugs and mousetrap. The versions that worked with Swarm-2.1.1 and Swarm-2.2 are currently available in the testing subdirectory of the ftp archive. Look for [http://ftp.swarm.org/pub/swarm/apps/java/sdg/testing/jheatbugs-2001-03-28.tar.gz jheatbugs-2001-03-28.tar.gz] and [http://ftp.swarm.org/pub/swarm/apps/java/sdg/testing/jmousetrap-2001-09-13.tar.gz jmousetrap-2001-09-13.tar.gz].
We strongly encourage people to contribute new applications! The site includes a form for describing contributions.
==Paul Johnson's package of Objective-C applications==
[[User:Pauljohn|Paul Johnson]] has generously assembled a new package of applications for Swarm-2.2. This is a revised version, correcting a couple of glitches in saving of screen snapshots. It is available from Paul's web site: http://www.ku.edu/~pauljohn/Swarm/swarmapps-objc-2.2-2.tar.gz and also at the Swarm download site: http://ftp.swarm.org/pub/swarm/apps/objc/sdg/swarmapps-objc-2.2-2.tar.gz. Please keep testing and let Paul know how it works.
The package contains classic example Swarm applications, including:
*The Swarm tutorial (discussed in [[Swarm:_documentation_main_page#Swarm_User_Guide|the Swarm User Guide]])
*Heatbugs
*Mousetrap
*ArborgamesII (a simulation of forests used in publications by M. Savage et al.)
*SchellingII (Schelling's neighborhood segregation model)
*Conway (the Game of Life)
*sss (Swarm Sugar Scape).
We are soliciting volunteers who want to maintain some 'orphaned' applications from swarmapps-2.1.1. These apps that need love and attention are market, template, and hello-world. If you are interested in taking on one of those applications, or offering up other applications, contact [[User:Pauljohn|PJ]].
==Additional links==
*The world-famous Artificial Stock Market has its own homepage at http://artstkmkt.sourceforge.net (Objective-C)
*Paul Johnson keeps many examples of Swarm-related code, his own models, and other people's models, at: http://www.ku.edu/~pauljohn/Swarm/
*Keep your eye on the [[ABM_Resources|Agent-based modeling community pages]] for projects using Swarm.
*See the [[ABM_Resources#Software_Resources|software resources at the ABM Resources area of the wiki]] for a series of template models in Java and Objective-C Swarm, and for guidance on using Swarm with integrated development environments.
1dbb4c197a3e343450344c8bee376aae87af3b96
Swarm:Documentation main page
4
1660
2209
2208
2016-06-22T19:04:49Z
SRogers
8
/* Swarm Documentation Main Page */
wikitext
text/x-wiki
= Swarm Documentation Main Page =
User support via [http://lists.nongnu.org/mailman/listinfo/swarm-support Swarm Support].
The primary source of user support for Swarm software is the swarm-support@nongnu.org email list, where questions are answered by fellow Swarm users on a voluntary basis. To keep from wearing out these volunteers, please first try the other resources listed below, and try searching the support email list archives because many common problems have already been addressed there. If you still need help, post a question to swarm-support@nongnu.org (you must first subscribe!). Use swarm-support@nongnu.org for problems installing and using Swarm software, reporting bugs, asking how to program specific things, and discussing topics related to Swarm software. Discussion of general modeling issues should be directed instead to swarm-modeling@nongnu.org.
== Official Documentation Set for Swarm 2.2 ==
This book (on-line or downloadable) includes the following sections:
* A Brief Introduction to Swarm (not updated from previous versions)
* Getting Started with Swarm (there is little here because up-to-date information is now maintained here on the Swarm wiki)
* Reference Guide to Swarm 2.2, which is the Objective-C Swarm bible. It includes:
** Swarm Changes and Compatibility: porting notes to assist in upgrading applications from previous versions to Swarm 2.1. No porting notes are available for Swarm 2.2 because there are few differences from 2.1.
** Descriptions of all the classes, methods, and protocols in all the Swarm libraries. This is where you look to see what is in Swarm, and how to use it.
** Indexes to the protocols and methods.
The Documentation Set is available at:
* [http://savannah.spinellicreations.com//swarm/docs/set/set.html on-line]
* in a rough-and-ready [http://savannah.spinellicreations.com//swarm/docs/set/set.pdf PDF]
== Java Reference Guide to Swarm 2.2 ==
The Java Reference Guide provides comprehensive documentation of all the packages and classes of Java Swarm 2.2 in standard Java API format. It is available [http://download.savannah.gnu.org/releases/swarm/docs/refbook-java/ on-line] or it can be downloaded:
* [http://download.savannah.gnu.org/releases/swarm/docs/refbook-java-2.2.zip ZIP archive]
* [http://download.savannah.gnu.org/releases/swarm/docs/refbook-java-2.2.tar.gz TAR/GZ archive]
== WIP ==
The following needs cleanup.
Java Demo
We provide step-by-step instructions for compiling and running the Java program Jheatbugs-3.0 on Windows XP using Swarm 2.2. Our demo covers interactive (visual) mode as well as batch mode (multiple runs with output to files).
Japanese Document Set
The Swarm 1.4 documentation has been translated into Japanese by Kozo Keikaku Engineering Inc.
Swarm User Guide
The Swarm User Guide is somewhat out of date but still a good place for beginners to learn what Swarm is and get started using it. Among the topics covered are:
An introduction to object-oriented programming
The conceptual foundation of Swarm (essential for using Swarm successfully!)
Swarm's graphical interfaces
Using tutorials and examples to learn how to program with Swarm
Using the collections, random number, and serialization tools
Debugging
Frequently Asked Questions
There are currently two FAQs for Swarm. Paul Johnson's FAQ is by far the largest and most actively maintained. But with Swarm 2.2, much of the information regarding Java on Windows is obsolete — see our step-by-step instructions for compiling and running the Java program Jheatbugs-3.0 on Windows XP using Swarm 2.2. Our demo covers interactive (visual) mode as well as batch mode (multiple runs with output to files).
There is also a Swarm FAQ section of this wiki. It contains a variety of tips and tricks for installing Swarm, building models, fixing problems, and making your code work faster and better.
Example and template codes
Using existing models as examples or templates is one of the fastest ways to get started with Swarm.
See the applications and contributed code page for many example codes. There is information at the applications page on how to install and run these.
See additional template software for a variety of platforms, including Java and Objective-C Swarm, at Software_templates.
Tutorials
Presentation materials from several Swarm classes are available at Swarm_tutorials.
(Altogether different is the Swarm tutorial model, which you can find from here on the applications page and is discussed in the User Guide.)
Our step-by-step instructions for compiling and running the Java program Jheatbugs-3.0 on Windows XP using Swarm 2.2 are in effect a tutorial, covering interactive (visual) mode as well as batch mode (multiple runs with output to files).
Objective-C documentation
A variety of materials on the Objective-C language are on the Objective-C page.
Publications and papers on Swarm
Do you need a citation for Swarm? We recommend:
Minar, N., R. Burkhart, C. Langton, and M. Askenazi. 1996. The Swarm simulation system: a toolkit for building multi-agent simulations. Working Paper 96-06-042, Santa Fe Institute, Santa Fe. Available in postscript from the Santa Fe Institute's publications site or here; or File:MinarEtAl96.pdf.
You can also cite the software directly:
Swarm Development Group. 1999. Swarm. www.swarm.org. Swarm Development Group, Santa Fe, New Mexico.
A list of papers and presentations on Swarm is at Papers_on_Swarm.
Retrieved from "http://www.swarm.org/index.php?title=Swarm:_documentation_main_page&oldid=5453"
2941ded289d63216688229b8f29088464572b32f
2208
2207
2016-06-21T02:05:23Z
SRogers
8
wikitext
text/x-wiki
= Swarm Documentation Main Page =
User support via [http://lists.nongnu.org/mailman/listinfo/swarm-support Swarm Support].
The primary source of user support for Swarm software is the swarm-support@nongnu.org email list, where questions are answered by fellow Swarm users on a voluntary basis. To keep from wearing out these volunteers, please first try the other resources listed below, and try searching the support email list archives because many common problems have already been addressed there. If you still need help, post a question to swarm-support@nongnu.org (you must first subscribe!). Use swarm-support@nongnu.org for problems installing and using Swarm software, reporting bugs, asking how to program specific things, and discussing topics related to Swarm software. Discussion of general modeling issues should be directed instead to swarm-modeling@nongnu.org.
== Official Documentation Set for Swarm 2.2 ==
This book (on-line or downloadable) includes the following sections:
* A Brief Introduction to Swarm (not updated from previous versions)
* Getting Started with Swarm (there is little here because up-to-date information is now maintained here on the Swarm wiki)
* Reference Guide to Swarm 2.2, which is the Objective-C Swarm bible. It includes:
** Swarm Changes and Compatibility: porting notes to assist in upgrading applications from previous versions to Swarm 2.1. No porting notes are available for Swarm 2.2 because there are few differences from 2.1.
** Descriptions of all the classes, methods, and protocols in all the Swarm libraries. This is where you look to see what is in Swarm, and how to use it.
** Indexes to the protocols and methods.
The Documentation Set is available:
* [http://savannah.spinellicreations.com//swarm/docs/set/set.html on-line]
* in a rough-and-ready [http://savannah.spinellicreations.com//swarm/docs/set/set.pdf PDF]
== WIP ==
The following needs cleaning up.
Objective-C Reference Guide
In addition to being available on-line as part of the Documentation Set, the Objective-C reference guide by itself is available (in html) for download:
ZIP archive
TAR/GZ archive
Java Reference Guide to Swarm 2.2
The Java Reference Guide provides comprehensive documentation of all the packages and classes of Java Swarm 2.2, in standard Java API format. It is available on-line at: http://www.swarm.org/swarmdocs-2.2/refbook-java/
Alternatively, it can be downloaded:
ZIP archive
TAR/GZ archive
Java Demo
We provide step-by-step instructions for compiling and running the Java program Jheatbugs-3.0 on Windows XP using Swarm 2.2. Our demo covers interactive (visual) mode as well as batch mode (multiple runs with output to files).
Japanese Document Set
The Swarm 1.4 documentation has been translated into Japanese by Kozo Keikaku Engineering Inc.
Swarm User Guide
The Swarm User Guide is somewhat out of date but still a good place for beginners to learn what Swarm is and get started using it. Among the topics covered are:
An introduction to object-oriented programming
The conceptual foundation of Swarm (essential for using Swarm successfully!)
Swarm's graphical interfaces
Using tutorials and examples to learn how to program with Swarm
Using the collections, random number, and serialization tools
Debugging
Frequently Asked Questions
There are currently two FAQs for Swarm. Paul Johnson's FAQ is by far the largest and most actively maintained. But with Swarm 2.2, much of the information regarding Java on Windows is obsolete — see our step-by-step instructions for compiling and running the Java program Jheatbugs-3.0 on Windows XP using Swarm 2.2. Our demo covers interactive (visual) mode as well as batch mode (multiple runs with output to files).
There is also a Swarm FAQ section of this wiki. It contains a variety of tips and tricks for installing Swarm, building models, fixing problems, and making your code work faster and better.
Example and template codes
Using existing models as examples or templates is one of the fastest ways to get started with Swarm.
See the applications and contributed code page for many example codes. There is information at the applications page on how to install and run these.
See additional template software for a variety of platforms, including Java and Objective-C Swarm, at Software_templates.
Tutorials
Presentation materials from several Swarm classes are available at Swarm_tutorials.
(Altogether different is the Swarm tutorial model, which you can find from here on the applications page and is discussed in the User Guide.)
Our step-by-step instructions for compiling and running the Java program Jheatbugs-3.0 on Windows XP using Swarm 2.2 are in effect a tutorial, covering interactive (visual) mode as well as batch mode (multiple runs with output to files).
Objective-C documentation
A variety of materials on the Objective-C language are on the Objective-C page.
Publications and papers on Swarm
Do you need a citation for Swarm? We recommend:
Minar, N., R. Burkhart, C. Langton, and M. Askenazi. 1996. The Swarm simulation system: a toolkit for building multi-agent simulations. Working Paper 96-06-042, Santa Fe Institute, Santa Fe. Available in postscript from the Santa Fe Institute's publications site or here; or File:MinarEtAl96.pdf.
You can also cite the software directly:
Swarm Development Group. 1999. Swarm. www.swarm.org. Swarm Development Group, Santa Fe, New Mexico.
A list of papers and presentations on Swarm is at Papers_on_Swarm.
Retrieved from "http://www.swarm.org/index.php?title=Swarm:_documentation_main_page&oldid=5453"
5a43f3b7bf25749d216f7b0ebe5bf984f07c18ca
2207
2206
2016-06-21T01:52:30Z
SRogers
8
wikitext
text/x-wiki
= Swarm Documentation Main Page =
User support via [http://lists.nongnu.org/mailman/listinfo/swarm-support Swarm Support].
The primary source of user support for Swarm software is the swarm-support@nongnu.org email list, where questions are answered by fellow Swarm users on a voluntary basis. To keep from wearing out these volunteers, please first try the other resources listed below, and try searching the support email list archives because many common problems have already been addressed there. If you still need help, post a question to swarm-support@nongnu.org (you must first subscribe!). Use swarm-support@nongnu.org for problems installing and using Swarm software, reporting bugs, asking how to program specific things, and discussing topics related to Swarm software. Discussion of general modeling issues should be directed instead to swarm-modeling@nongnu.org.
== Official Documentation Set for Swarm 2.2 ==
This book (on-line or downloadable) includes the following sections:
* A Brief Introduction to Swarm (not updated from previous versions)
* Getting Started with Swarm (there is little here because up-to-date information is now maintained here on the Swarm wiki)
* Reference Guide to Swarm 2.2, which is the Objective-C Swarm bible. It includes:
** Swarm Changes and Compatibility: porting notes to assist in upgrading applications from previous versions to Swarm 2.1. No porting notes are available for Swarm 2.2 because there are few differences from 2.1.
** Descriptions of all the classes, methods, and protocols in all the Swarm libraries. This is where you look to see what is in Swarm, and how to use it.
** Indexes to the protocols and methods.
The Documentation Set is available:
* on-line (TBD)
* in a rough-and-ready PDF
4d18bd84bbdfb3789ec9b6f64649bb0d310f43da
2206
2016-06-21T01:15:04Z
SRogers
8
Created page with "= Swarm Documentation Main Page = == Official Documentation Set for Swarm 2.2 == This book (on-line or downloadable) includes the following sections: * A Brief Introduction..."
wikitext
text/x-wiki
= Swarm Documentation Main Page =
== Official Documentation Set for Swarm 2.2 ==
This book (on-line or downloadable) includes the following sections:
* A Brief Introduction to Swarm (not updated from previous versions)
* Getting Started with Swarm (there is little here because up-to-date information is now maintained here on the Swarm wiki)
* Reference Guide to Swarm 2.2, which is the Objective-C Swarm bible. It includes:
** Swarm Changes and Compatibility: porting notes to assist in upgrading applications from previous versions to Swarm 2.1. No porting notes are available for Swarm 2.2 because there are few differences from 2.1.
** Descriptions of all the classes, methods, and protocols in all the Swarm libraries. This is where you look to see what is in Swarm, and how to use it.
** Indexes to the protocols and methods. *
The Documentation Set is available:
* on-line
* in a rough-and-ready PDF
5072f27e9bb9f58742a1d374f07d15185a258246
Swarm:Mailing lists
4
14
2192
2191
2016-06-06T21:27:57Z
SRogers
8
/* Mailing lists */
wikitext
text/x-wiki
'''Mailing lists''' are hosted on swarm.org.
==Important notes==
#'''Please, do not send subscription requests to the list, itself!!''' To subscribe, unsubscribe and general list information, please visit http://savannah.nongnu.org/mail/?group=swarm and choose the list you are interested in.
#'''You must be subscribed in order to post to lists!'''. To reduce spam, we've switched to subscriber-only posting. Non-members are not allowed to post messages to these list. If you wish to just be able to post without approval, you can subscribe and then immediately select the "Disable delivery" option. This means you will be able to post to the list in future without waiting for the list administrator to manually approve each post, but you won't actually receive postings to the list (unless you want to). You also must ensure that you post from an address that matches the address you are subscribed with.
#'''No HTML mail, please!''' Please send your mail in plain ASCII text, rather than HTML, it reduces bandwidth, is more portable (e.g. can be read under text-only mail clients like "pine") and saves space in our mailing list archives. Also please refrain from posting attachments, unless absolutely necessary. Provide a link to a web or ftp site if you wish to make available a download (e.g. a tar file, PDF etc.)
==Mailing lists==
'''[http://www.swarm.org/mailman/listinfo/announce Announcements]:''' announce@swarm.org ([http://lists.nongnu.org/archive/html/swarm-announce/ archives])
:The Swarm Announce list: announce@swarm.org, is the list for people interested in Swarm to keep in touch with progress on the system. Major announcements of milestones and miscellaneous information about Swarm are posted here. Please do not mail to announce yourself.
'''[http://www.swarm.org/mailman/listinfo/support Swarm Support]''': support@swarm.org ([http://lists.nongnu.org/archive/html/swarm-support/ archives])
:The Swarm Support list, support@swarm.org, is for the discussion of the technical details of the day to day usage of Swarm. support is our major focus for user community. The traffic on this list can sometimes be quite technical. support is a sub-list of announce, which means that any message being sent to the announce list will also be sent to the support list. So, if you're interested in all the details and in the announcements, then simply subscribe to the support list. You do not need to subscribe to both lists. If you just want the announcements but don't care about the details, then subscribe to announce.
:You can often find answers before posting a support request by searching the archives; see below for how.
'''[http://www.swarm.org/mailman/listinfo/modelling Agent-based Modelling]''': modelling@swarm.org ([http://lists.nongnu.org/archive/html/swarm-modeling/ archives])
:The Agent-based Modelling list, modelling@swarm.org, is for discussion of general modelling and simulation issues, particularly those having to do with agent- or individual-based modeling and software platforms for ABMs.
'''[http://www.swarm.org/mailman/listinfo/gis Swarm & GIS]''': gis@swarm.org ([http://lists.nongnu.org/archive/html/swarm-gis/ archives])
:The Swarm GIS list, gis@swarm.org, was for discussion of Geographical Information Systems (GIS) like GRASS, particularly with respect to their usage in conjunction with Swarm. This list has been discontinued.
==Search Swarm mailing lists via Google==
We currently have no dedicated search engine for the website or mailing lists. To search our site directly from Google, you can simply enter site:www.swarm.org followed by your keywords. e.g. to search for Debian, simply enter: <code>site:www.swarm.org debian</code>
3c4adf618bf36e235f2b34f89a86fd3e3730fa7a
2191
2190
2016-06-06T21:06:48Z
SRogers
8
/* Mailing lists */
wikitext
text/x-wiki
'''Mailing lists''' are hosted on swarm.org.
==Important notes==
#'''Please, do not send subscription requests to the list, itself!!''' To subscribe, unsubscribe and general list information, please visit http://savannah.nongnu.org/mail/?group=swarm and choose the list you are interested in.
#'''You must be subscribed in order to post to lists!'''. To reduce spam, we've switched to subscriber-only posting. Non-members are not allowed to post messages to these list. If you wish to just be able to post without approval, you can subscribe and then immediately select the "Disable delivery" option. This means you will be able to post to the list in future without waiting for the list administrator to manually approve each post, but you won't actually receive postings to the list (unless you want to). You also must ensure that you post from an address that matches the address you are subscribed with.
#'''No HTML mail, please!''' Please send your mail in plain ASCII text, rather than HTML, it reduces bandwidth, is more portable (e.g. can be read under text-only mail clients like "pine") and saves space in our mailing list archives. Also please refrain from posting attachments, unless absolutely necessary. Provide a link to a web or ftp site if you wish to make available a download (e.g. a tar file, PDF etc.)
==Mailing lists==
'''[http://www.swarm.org/mailman/listinfo/announce Announcements]:''' announce@swarm.org ([http://lists.nongnu.org/archive/html/swarm-announce/ archives])
:The Swarm Announce list: announce@swarm.org, is the list for people interested in Swarm to keep in touch with progress on the system. Major announcements of milestones and miscellaneous information about Swarm are posted here. Please do not mail to announce yourself.
'''[http://www.swarm.org/mailman/listinfo/support Swarm Support]''': support@swarm.org ([http://www.swarm.org/pipermail/support/ archives])
:The Swarm Support list, support@swarm.org, is for the discussion of the technical details of the day to day usage of Swarm. support is our major focus for user community. The traffic on this list can sometimes be quite technical. support is a sub-list of announce, which means that any message being sent to the announce list will also be sent to the support list. So, if you're interested in all the details and in the announcements, then simply subscribe to the support list. You do not need to subscribe to both lists. If you just want the announcements but don't care about the details, then subscribe to announce.
:You can often find answers before posting a support request by searching the archives; see below for how.
'''[http://www.swarm.org/mailman/listinfo/modelling Agent-based Modelling]''': modelling@swarm.org ([http://www.swarm.org/pipermail/modelling/ archives])
:The Agent-based Modelling list, modelling@swarm.org, is for discussion of general modelling and simulation issues, particularly those having to do with agent- or individual-based modeling and software platforms for ABMs.
'''[http://www.swarm.org/mailman/listinfo/gis Swarm & GIS]''': gis@swarm.org ([http://www.swarm.org/pipermail/gis/ archives])
:The Swarm GIS list, gis@swarm.org, was for discussion of Geographical Information Systems (GIS) like GRASS, particularly with respect to their usage in conjunction with Swarm. This list has been discontinued.
==Search Swarm mailing lists via Google==
We currently have no dedicated search engine for the website or mailing lists. To search our site directly from Google, you can simply enter site:www.swarm.org followed by your keywords. e.g. to search for Debian, simply enter: <code>site:www.swarm.org debian</code>
c2ea51642198a5a1a63950d4882587990dfdc2cb
2190
27
2016-06-06T20:58:39Z
SRogers
8
/* Important notes */
wikitext
text/x-wiki
'''Mailing lists''' are hosted on swarm.org.
==Important notes==
#'''Please, do not send subscription requests to the list, itself!!''' To subscribe, unsubscribe and general list information, please visit http://savannah.nongnu.org/mail/?group=swarm and choose the list you are interested in.
#'''You must be subscribed in order to post to lists!'''. To reduce spam, we've switched to subscriber-only posting. Non-members are not allowed to post messages to these list. If you wish to just be able to post without approval, you can subscribe and then immediately select the "Disable delivery" option. This means you will be able to post to the list in future without waiting for the list administrator to manually approve each post, but you won't actually receive postings to the list (unless you want to). You also must ensure that you post from an address that matches the address you are subscribed with.
#'''No HTML mail, please!''' Please send your mail in plain ASCII text, rather than HTML, it reduces bandwidth, is more portable (e.g. can be read under text-only mail clients like "pine") and saves space in our mailing list archives. Also please refrain from posting attachments, unless absolutely necessary. Provide a link to a web or ftp site if you wish to make available a download (e.g. a tar file, PDF etc.)
==Mailing lists==
'''[http://www.swarm.org/mailman/listinfo/announce Announcements]:''' announce@swarm.org ([http://www.swarm.org/pipermail/announce/ archives])
:The Swarm Announce list: announce@swarm.org, is the list for people interested in Swarm to keep in touch with progress on the system. Major announcements of milestones and miscellaneous information about Swarm are posted here. Please do not mail to announce yourself.
'''[http://www.swarm.org/mailman/listinfo/support Swarm Support]''': support@swarm.org ([http://www.swarm.org/pipermail/support/ archives])
:The Swarm Support list, support@swarm.org, is for the discussion of the technical details of the day to day usage of Swarm. support is our major focus for user community. The traffic on this list can sometimes be quite technical. support is a sub-list of announce, which means that any message being sent to the announce list will also be sent to the support list. So, if you're interested in all the details and in the announcements, then simply subscribe to the support list. You do not need to subscribe to both lists. If you just want the announcements but don't care about the details, then subscribe to announce.
:You can often find answers before posting a support request by searching the archives; see below for how.
'''[http://www.swarm.org/mailman/listinfo/modelling Agent-based Modelling]''': modelling@swarm.org ([http://www.swarm.org/pipermail/modelling/ archives])
:The Agent-based Modelling list, modelling@swarm.org, is for discussion of general modelling and simulation issues, particularly those having to do with agent- or individual-based modeling and software platforms for ABMs.
'''[http://www.swarm.org/mailman/listinfo/gis Swarm & GIS]''': gis@swarm.org ([http://www.swarm.org/pipermail/gis/ archives])
:The Swarm GIS list, gis@swarm.org, was for discussion of Geographical Information Systems (GIS) like GRASS, particularly with respect to their usage in conjunction with Swarm. This list has been discontinued.
==Search Swarm mailing lists via Google==
We currently have no dedicated search engine for the website or mailing lists. To search our site directly from Google, you can simply enter site:www.swarm.org followed by your keywords. e.g. to search for Debian, simply enter: <code>site:www.swarm.org debian</code>
002ac243efbf176af2d4e0a5484908863d88b188
27
2015-03-07T06:29:18Z
Pauljohn32
1
Created page with "'''Mailing lists''' are hosted on swarm.org. ==Important notes== #'''Please, do not send subscription requests to the list, itself!!''' To subscribe, unsubscribe and general..."
wikitext
text/x-wiki
'''Mailing lists''' are hosted on swarm.org.
==Important notes==
#'''Please, do not send subscription requests to the list, itself!!''' To subscribe, unsubscribe and general list information, please visit http://www.swarm.org/mailman/listinfo/ and choose the list you are interested in.
#'''You must be subscribed in order to post to lists!'''. To reduce spam, we've switched to subscriber-only posting. Non-members are not allowed to post messages to these list. If you wish to just be able to post without approval, you can subscribe and then immediately select the "Disable delivery" option. This means you will be able to post to the list in future without waiting for the list administrator to manually approve each post, but you won't actually receive postings to the list (unless you want to). You also must ensure that you post from an address that matches the address you are subscribed with.
#'''No HTML mail, please!''' Please send your mail in plain ASCII text, rather than HTML, it reduces bandwidth, is more portable (e.g. can be read under text-only mail clients like "pine") and saves space in our mailing list archives. Also please refrain from posting attachments, unless absolutely necessary. Provide a link to a web or ftp site if you wish to make available a download (e.g. a tar file, PDF etc.)
==Mailing lists==
'''[http://www.swarm.org/mailman/listinfo/announce Announcements]:''' announce@swarm.org ([http://www.swarm.org/pipermail/announce/ archives])
:The Swarm Announce list: announce@swarm.org, is the list for people interested in Swarm to keep in touch with progress on the system. Major announcements of milestones and miscellaneous information about Swarm are posted here. Please do not mail to announce yourself.
'''[http://www.swarm.org/mailman/listinfo/support Swarm Support]''': support@swarm.org ([http://www.swarm.org/pipermail/support/ archives])
:The Swarm Support list, support@swarm.org, is for the discussion of the technical details of the day to day usage of Swarm. support is our major focus for user community. The traffic on this list can sometimes be quite technical. support is a sub-list of announce, which means that any message being sent to the announce list will also be sent to the support list. So, if you're interested in all the details and in the announcements, then simply subscribe to the support list. You do not need to subscribe to both lists. If you just want the announcements but don't care about the details, then subscribe to announce.
:You can often find answers before posting a support request by searching the archives; see below for how.
'''[http://www.swarm.org/mailman/listinfo/modelling Agent-based Modelling]''': modelling@swarm.org ([http://www.swarm.org/pipermail/modelling/ archives])
:The Agent-based Modelling list, modelling@swarm.org, is for discussion of general modelling and simulation issues, particularly those having to do with agent- or individual-based modeling and software platforms for ABMs.
'''[http://www.swarm.org/mailman/listinfo/gis Swarm & GIS]''': gis@swarm.org ([http://www.swarm.org/pipermail/gis/ archives])
:The Swarm GIS list, gis@swarm.org, was for discussion of Geographical Information Systems (GIS) like GRASS, particularly with respect to their usage in conjunction with Swarm. This list has been discontinued.
==Search Swarm mailing lists via Google==
We currently have no dedicated search engine for the website or mailing lists. To search our site directly from Google, you can simply enter site:www.swarm.org followed by your keywords. e.g. to search for Debian, simply enter: <code>site:www.swarm.org debian</code>
defa9e634055216230b962236d55fc27a208ade3
Swarm:Platforms
4
8
17
2015-03-07T05:47:54Z
Pauljohn32
1
Created page with "This page has archived information on running Swarm on more exotic platforms. '''For information on running Swarm on Linux, Windows, and Macintosh:</br> go to the Swa..."
wikitext
text/x-wiki
This page has archived information on running Swarm on more exotic platforms.
'''For information on running Swarm on Linux, Windows, and Macintosh:</br> go to the [[Swarm:_stable_release|stable release page]].'''
==HP/UX==
Swarm 2.0 is known to run on HPUX 9, 10, and 11. Java users of Kaffe
will need this [27]libltdl patch. Also, to avoid a linker bug, build
gcc-2.95 with this [28]compiler patch to gcc/objc/objc-act.c
==IRIX==
We have reports from some successful users of Swarm on SGIs in the following
configurations:
* SGI Origin 200, IRIX 6.4, GCC 2.7.2.2 w/old_ld configured for IRIX 5.3
* IRIX 5.3, GCC 2.7.2.1
* IRIX 6.4 GCC 2.8
* IRIX 6.5 GCC 2.95.1
Note that IRIX users need to install libffi, and configure Swarm with the --with-ffidir option.
4d44098162cb0c146e71bbb0d7aa147cd18b933e
Swarm:Software main page
4
7
16
2015-03-07T05:45:53Z
Pauljohn32
1
Created page with "This page provides links for downloading and installing Swarm software. Swarm is a library of object-oriented classes that implements the Swarm conceptual framework for agen..."
wikitext
text/x-wiki
This page provides links for downloading and installing Swarm software.
Swarm is a library of object-oriented classes that implements the Swarm conceptual framework for agent-based models and provides many tools for implementing, observing, and conducting experiments on ABMs. Users write their own software but (a) follow Swarm's conceptual framework and conventions to design the software, and (b) use the Swarm libraries to do much of the work. The library is written in Objective-C, an object-oriented extension of the C programming language.
==Languages and platforms==
Originally, Swarm was available only by writing Objective-C code in a Unix-based operating system. Now, Java Swarm makes Swarm's Objective-C libraries available to Java code, so users can write their part of a Swarm model in Java. Swarm is now easily installed and used in Windows operating systems via Cygwin, a package that provides a Unix-like environment in Windows.
To use Swarm on Linux, Windows, or Macintosh, see the [[Swarm:_stable_release|stable release page]]. Experience with other Unix-based systems is archived at [[Swarm:_platforms]]. Information on additional languages and platforms is in the [[SwarmFAQ|FAQ]].
==Swarm 2.2: Our current stable release==
Most users will want to install Swarm 2.2, our current release. Information and downloads are on the [[Swarm:_stable_release|stable release page]].
==Downloading and installing test applications==
There is information at [[Swarm:_applications|the Swarm applications page]] on how to download and install example Swarm codes.
==Development snapshots==
Periodically, intermediate pre-release versions of Swarm are made available, for example to fix bugs or make improvements available. See [[Swarm:_development_snapshot|the development snapshot page]] for information.
==Software license==
See [[Swarm:_license|the license page]] for information on how Swarm software is licensed and copyrighted.
==Where Swarm development happens: GNU Savannah site==
The CVS, bug tracking, and development for Swarm are hosted on GNU Savannah, a site run by the Free Software Foundation for hosting free software projects.
*'''http://savannah.gnu.org/projects/swarm/'''
The latest source tarballs for Swarm and swarmapps will be made available there, so it acts as a partial mirror if you can't access ftp.swarm.org or one of the other mirrors. In the future, we plan to use some of Savannah's features for co-ordinating projects and/or allow users to co-ordinate their own Swarm-related projects.
Several users also use SourceForge for co-ordinating their projects, these are independent from the SDG:
* Artificial Stock Market: http://sourceforge.net/projects/artstkmkt/
* Evo: http://sourceforge.net/projects/evo/
==New development ideas==
[[Swarm:_IdeasList|This page contains a list of development ideas for people willing to contribute to the Swarm project]].
__NOEDITSECTION__
e773ba2ed00a58e1dd09b83ac71261ee2f4713e3
Swarm:Stable release
4
9
2211
2185
2017-10-22T16:43:38Z
Railsback
2
/* Packaged (binary) distributions (2.2) */
wikitext
text/x-wiki
==Stable release: Swarm 2.2==
The following text is partially obsolete: The last stable release of Swarm is 2.4.1, but it was not packaged for Windows using Cygwin. The current Windows package uses MinGW instead of Cygwin.
As of February, 2005, Swarm 2.2 is the new stable release. This release is the culmination of the numerous development snapshots since the previous release (Swarm 2.1.1, which was released in April, 2000).
Swarm 2.2 adds a few new capabilities to Swarm. These include improved support for HDF5 and Lisp archiving of data, with support for serialization; a variety of data summary options added to EZGraph and Averager; and binomial and Poisson random number distributions. Several components have been optimized for efficiency, including the random number generators.
Swarm 2.2 also works reliably in Windows XP, fixes a number of bugs, works around drag-and-drop problems with Tcl/Tk in Windows, and includes a number of changes to speed up model execution.
The documentation set has been updated for Swarm 2.2; it is available from the [[Swarm: documentation|Swarm documentation]] page.
NEWS (user-visible changes)
* '''See the list of known bugs''', below!
* Release Notes for Swarm 2.2
** Numerous bugs have been fixed since 2.1.1
** MacOS X is now supported
** The Windows binaries for java Swarm now use the MingW compiler.
** Two new probability distributions (binomial, Poisson) have been added
to the Random library.
==Notes==
*If downloading a binary from within your web browser, you should do it in such a way that the browser never displays the file on the screen. If you save a file after viewing it, many browsers corrupt it. In Netscape, shift-clicking the url will save it directly to disk.
*The needed-software directory only applies to building Swarm from source. If you are installing one of the binary distributions, you will not be required to build any packages from source, all relevant packages will either be bundled with your distribution (such as Red Hat and Debian) and/or we provide the appropriate packages in on the ftp site, under the subdirectory relevant for that distribution (list below).
==Packaged (binary) distributions (2.2)==
The packaged (binary) distributions provide an environment against which user applications can be compiled and linked, without building the Swarm kernel from source.
===VirtualBox virtual Linux machine with Swarm===
Steve Railsback created a virtual machine with Swarm for Oracle's VirtualBox software. The machine runs the CentOS 6 Linux distribution, one of the last supported distributions that uses, by default, a version (4.4) of the GCC compiler that Swarm is compatible with. In theory this virtual machine could be imported to VirtualBox running on any operating system. If you want to try it, contact Steve: Steve at LangRailsback.com October 2017.
===Windows binaries===
The following text describes the Cygwin distribution of Swarm for Windows. We now strongly recommend instead the MinGW release. See [[Swarm_and_MinGW]].
'''Windows users should see the MinGW package for Swarm here:''' [[Swarm_and_MinGW]] instead of using the following obsolete information, unless they really want to...
'''Windows binaries are different from previous versions!''' In Swarm 2.1.1 and earlier versions, Swarm Windows binaries were distributed as an executable file that installed Cygwin and Swarm on your computer. Swarm 2.2 is distributed by providing a special version of Cygwin that includes Swarm; this version is installed using a special version of the Cygwin setup program. Additional information and instructions are included in the [[Windows binary notes]].
The Windows binaries are installed via a setup program at:
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/cygwin/setup.exe
This program downloads and installs Cygwin and Swarm from the internet; you will need a high-speed internet connection. (Alternatives for computers without high-speed access are discussed in [[Windows binary notes]].)
Java binaries for Swarm 2.2 now use the MingW compiler (http://www.mingw.org ) instead of Sun JDK. This means they can be run outside of Cygwin. [http://www.swarm.org/swarmdocs-2.2/set/swarm.installbook.install.article.html Notes for installing Java Swarm] are in the Swarm documentation set. Java binaries for Windows are at:
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.tar.gz
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.zip
For the latest information you should check out Paul Johnson's [http://www.ku.edu/~pauljohn/SwarmFaq/SwarmOnlineFaq.html online FAQ] or consult the [[Swarm: Mailing lists]] archives.
===GNU/Linux binaries===
Paul Johnson is maintaining [http://pj.freefaculty.org/Swarm/Swarm-Packages/ RPMs and other packages] of Swarm for several Linux distributions.
Charlie Sharpsteen built a [https://launchpad.net/~sdg-team/+archive/ubuntu/stable Swarm site on Launchpad] which provides Swarm as a Ubuntu package. As of February 2015, Swarm can be installed (at least in Ubuntu 12.04) via:
sudo apt-add-repository ppa:sdg-team/stable
sudo apt-get update
sudo apt-get install libswarm2-dev gobjc-4.5
You may need to edit /usr/etc/swarm/Makefile.common to use gcc-4.5 for CC and OBJC. Ubuntu 12.04 was a long-term support (LTS) release that should be supported until in April 2017.
===MacOS X binaries===
Bill Northcott has produced binaries for MacOS X; see details at [[Swarm: MacOS X binaries]] These packages include everything other than standard Apple software needed to build and run Swarm models on Panther. Tiger (MacOS X 10.4) is the preferred operating system but older binaries for Panther are available. There are several versions of the gcc compiler provided, including bleeding edge versions built from the latest code in Apple's opensource cvs. This compiler includes Fortran, libffi and the GNU Objective-C runtime library.
===Other platforms===
Binaries for other platforms have not been developed. If you develop binaries for another platform, please let us know so they can be shared.
===Binaries of previous versions===
Legacy binaries (unmaintained) are available here:
*http://download.savannah.gnu.org/releases/swarm/binaries/old/
==Swarm source (2.4)==
The Swarm source distribution includes a complete set of swarm kernel sources and can be found at:
*http://download.savannah.gnu.org/releases/swarm/src/swarm/swarm-2.4.1.tar.gz
The user must first install (or verify the availability of) appropriate versions of the needed software in order to provide a proper compilation and execution environment for Swarm. We no longer maintain an up-to-date archive of the packages needed by Swarm, as they are readily found on the web. The list of packages needed by Swarm 2.4 is:
* Tcl/Tk -- either built from source or using -devel binary packages on your favorite distribution
* BLT 2.4z, not 3.0
* libpng 1.2.5
* zlib 1.2.2
* xpm-4.2 (or the xpm-nox package for Cygwin)
* X11R6 on Linux and MacOS X (with SDK)
* Optionally, HDF5 1.6.2
* Optionally, Java SDK 1.4.2
* GCC 3.4.4 with Objective C (gcc-4.0 is preferable particularly on non-x86 platforms such as PowerPC, Alpha etc..)
* GNU Make
These packages and information on installing them for Swarm are at: [[Swarm_and_MinGW]]
Once the environment has been set up, and the source downloaded and de-tarred into an appropriate directory, the user should consult the <tt>README</tt> and <tt>INSTALL</tt> file to learn what options should be specified to the configure script that configures Swarm to the local system. Compilation and linking are done using <tt>make</tt> as usual, after this step.
You also need an explicit <tt>make install</tt> step, after the initial <tt>make build</tt> to cleanly install Swarm to an appropriate location (for example <tt>/usr/local</tt>). This is explained futher in the <tt>README</tt> and <tt>INSTALL</tt> files contained in the distribution.
After compilation and installation of Swarm a set of program libraries and header files against which Swarm applications can be compiled and linked is available.
==Known bugs and fixes==
This section describes bugs that are known to exist in the release of version 2.2 and what you can do about them.
===Error in <tt>Averager</tt> minimum, maximum values===
Swarm's <tt>Averager</tt> class (in the Analysis library) calculates statistics over values selected from a collection of objects. The '''<tt>getMin</tt>''' and '''<tt>getMax</tt>''' methods do not work, and will report values that should easily (if checked) be detected as incorrect. (Note that the Reference Guide does not mention the '''<tt>getMax</tt>''' method but it does exist.) Bug reported here 21 April 2005.
Fixes:
''Windows users'' can download new DLL files with this bug fixed. These are (thanks to Marcus Daniels):
http://www.santafe.edu/~mgd/javaswarm.dll
http://www.santafe.edu/~mgd/cygswarm-0.dll
These would overwrite the equivalent files in the Java/Swarm binary distribution.
The <tt>cygswarm-0.dll</tt> goes in <tt>Cygwin/bin</tt>.
''RPMs for Redhat Linux'' are available from Paul Johnson; see the link above on this page.
''Builds from source code'' can check out the most recent source code at Swarm's Savannah site (see [[Swarm:_development_snapshot#CVS|CVS]]), or simply fix the offending line of code:
In <tt>Averager.m</tt>, change line 106 from
'''if (totalCount == 0)'''
to
'''if (totalCount == 0 || count == 0)'''
58831debc2334d3aa483bc586825f65bee3bb193
2185
2184
2015-12-05T01:19:17Z
SwarmWikiSysop
5
/* Swarm source (2.4) */
wikitext
text/x-wiki
==Stable release: Swarm 2.2==
The following text is partially obsolete: The last stable release of Swarm is 2.4.1, but it was not packaged for Windows using Cygwin. The current Windows package uses MinGW instead of Cygwin.
As of February, 2005, Swarm 2.2 is the new stable release. This release is the culmination of the numerous development snapshots since the previous release (Swarm 2.1.1, which was released in April, 2000).
Swarm 2.2 adds a few new capabilities to Swarm. These include improved support for HDF5 and Lisp archiving of data, with support for serialization; a variety of data summary options added to EZGraph and Averager; and binomial and Poisson random number distributions. Several components have been optimized for efficiency, including the random number generators.
Swarm 2.2 also works reliably in Windows XP, fixes a number of bugs, works around drag-and-drop problems with Tcl/Tk in Windows, and includes a number of changes to speed up model execution.
The documentation set has been updated for Swarm 2.2; it is available from the [[Swarm: documentation|Swarm documentation]] page.
NEWS (user-visible changes)
* '''See the list of known bugs''', below!
* Release Notes for Swarm 2.2
** Numerous bugs have been fixed since 2.1.1
** MacOS X is now supported
** The Windows binaries for java Swarm now use the MingW compiler.
** Two new probability distributions (binomial, Poisson) have been added
to the Random library.
==Notes==
*If downloading a binary from within your web browser, you should do it in such a way that the browser never displays the file on the screen. If you save a file after viewing it, many browsers corrupt it. In Netscape, shift-clicking the url will save it directly to disk.
*The needed-software directory only applies to building Swarm from source. If you are installing one of the binary distributions, you will not be required to build any packages from source, all relevant packages will either be bundled with your distribution (such as Red Hat and Debian) and/or we provide the appropriate packages in on the ftp site, under the subdirectory relevant for that distribution (list below).
==Packaged (binary) distributions (2.2)==
The packaged (binary) distributions provide an environment against which user applications can be compiled and linked, without building the Swarm kernel from source.
===Windows binaries===
The following text describes the Cygwin distribution of Swarm for Windows. We now strongly recommend instead the MinGW release. See [[Swarm_and_MinGW]].
'''Windows users should see the MinGW package for Swarm here:''' [[Swarm_and_MinGW]] instead of using the following obsolete information, unless they really want to...
'''Windows binaries are different from previous versions!''' In Swarm 2.1.1 and earlier versions, Swarm Windows binaries were distributed as an executable file that installed Cygwin and Swarm on your computer. Swarm 2.2 is distributed by providing a special version of Cygwin that includes Swarm; this version is installed using a special version of the Cygwin setup program. Additional information and instructions are included in the [[Windows binary notes]].
The Windows binaries are installed via a setup program at:
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/cygwin/setup.exe
This program downloads and installs Cygwin and Swarm from the internet; you will need a high-speed internet connection. (Alternatives for computers without high-speed access are discussed in [[Windows binary notes]].)
Java binaries for Swarm 2.2 now use the MingW compiler (http://www.mingw.org ) instead of Sun JDK. This means they can be run outside of Cygwin. [http://www.swarm.org/swarmdocs-2.2/set/swarm.installbook.install.article.html Notes for installing Java Swarm] are in the Swarm documentation set. Java binaries for Windows are at:
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.tar.gz
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.zip
For the latest information you should check out Paul Johnson's [http://www.ku.edu/~pauljohn/SwarmFaq/SwarmOnlineFaq.html online FAQ] or consult the [[Swarm: Mailing lists]] archives.
===GNU/Linux binaries===
Paul Johnson is maintaining [http://pj.freefaculty.org/Swarm/Swarm-Packages/ RPMs and other packages] of Swarm for several Linux distributions.
Charlie Sharpsteen built a [https://launchpad.net/~sdg-team/+archive/ubuntu/stable Swarm site on Launchpad] which provides Swarm as a Ubuntu package. As of February 2015, Swarm can be installed (at least in Ubuntu 12.04) via:
sudo apt-add-repository ppa:sdg-team/stable
sudo apt-get update
sudo apt-get install libswarm2-dev gobjc-4.5
You may need to edit /usr/etc/swarm/Makefile.common to use gcc-4.5 for CC and OBJC. Ubuntu 12.04 was a long-term support (LTS) release that should be supported until in April 2017.
===MacOS X binaries===
Bill Northcott has produced binaries for MacOS X; see details at [[Swarm: MacOS X binaries]] These packages include everything other than standard Apple software needed to build and run Swarm models on Panther. Tiger (MacOS X 10.4) is the preferred operating system but older binaries for Panther are available. There are several versions of the gcc compiler provided, including bleeding edge versions built from the latest code in Apple's opensource cvs. This compiler includes Fortran, libffi and the GNU Objective-C runtime library.
===Other platforms===
Binaries for other platforms have not been developed. If you develop binaries for another platform, please let us know so they can be shared.
===Binaries of previous versions===
Legacy binaries (unmaintained) are available here:
*http://download.savannah.gnu.org/releases/swarm/binaries/old/
==Swarm source (2.4)==
The Swarm source distribution includes a complete set of swarm kernel sources and can be found at:
*http://download.savannah.gnu.org/releases/swarm/src/swarm/swarm-2.4.1.tar.gz
The user must first install (or verify the availability of) appropriate versions of the needed software in order to provide a proper compilation and execution environment for Swarm. We no longer maintain an up-to-date archive of the packages needed by Swarm, as they are readily found on the web. The list of packages needed by Swarm 2.4 is:
* Tcl/Tk -- either built from source or using -devel binary packages on your favorite distribution
* BLT 2.4z, not 3.0
* libpng 1.2.5
* zlib 1.2.2
* xpm-4.2 (or the xpm-nox package for Cygwin)
* X11R6 on Linux and MacOS X (with SDK)
* Optionally, HDF5 1.6.2
* Optionally, Java SDK 1.4.2
* GCC 3.4.4 with Objective C (gcc-4.0 is preferable particularly on non-x86 platforms such as PowerPC, Alpha etc..)
* GNU Make
These packages and information on installing them for Swarm are at: [[Swarm_and_MinGW]]
Once the environment has been set up, and the source downloaded and de-tarred into an appropriate directory, the user should consult the <tt>README</tt> and <tt>INSTALL</tt> file to learn what options should be specified to the configure script that configures Swarm to the local system. Compilation and linking are done using <tt>make</tt> as usual, after this step.
You also need an explicit <tt>make install</tt> step, after the initial <tt>make build</tt> to cleanly install Swarm to an appropriate location (for example <tt>/usr/local</tt>). This is explained futher in the <tt>README</tt> and <tt>INSTALL</tt> files contained in the distribution.
After compilation and installation of Swarm a set of program libraries and header files against which Swarm applications can be compiled and linked is available.
==Known bugs and fixes==
This section describes bugs that are known to exist in the release of version 2.2 and what you can do about them.
===Error in <tt>Averager</tt> minimum, maximum values===
Swarm's <tt>Averager</tt> class (in the Analysis library) calculates statistics over values selected from a collection of objects. The '''<tt>getMin</tt>''' and '''<tt>getMax</tt>''' methods do not work, and will report values that should easily (if checked) be detected as incorrect. (Note that the Reference Guide does not mention the '''<tt>getMax</tt>''' method but it does exist.) Bug reported here 21 April 2005.
Fixes:
''Windows users'' can download new DLL files with this bug fixed. These are (thanks to Marcus Daniels):
http://www.santafe.edu/~mgd/javaswarm.dll
http://www.santafe.edu/~mgd/cygswarm-0.dll
These would overwrite the equivalent files in the Java/Swarm binary distribution.
The <tt>cygswarm-0.dll</tt> goes in <tt>Cygwin/bin</tt>.
''RPMs for Redhat Linux'' are available from Paul Johnson; see the link above on this page.
''Builds from source code'' can check out the most recent source code at Swarm's Savannah site (see [[Swarm:_development_snapshot#CVS|CVS]]), or simply fix the offending line of code:
In <tt>Averager.m</tt>, change line 106 from
'''if (totalCount == 0)'''
to
'''if (totalCount == 0 || count == 0)'''
a77ef78ad23765be728aa6f17e1aeb520c81a83b
2184
2183
2015-12-05T01:15:28Z
SwarmWikiSysop
5
/* Stable release: Swarm 2.2 */
wikitext
text/x-wiki
==Stable release: Swarm 2.2==
The following text is partially obsolete: The last stable release of Swarm is 2.4.1, but it was not packaged for Windows using Cygwin. The current Windows package uses MinGW instead of Cygwin.
As of February, 2005, Swarm 2.2 is the new stable release. This release is the culmination of the numerous development snapshots since the previous release (Swarm 2.1.1, which was released in April, 2000).
Swarm 2.2 adds a few new capabilities to Swarm. These include improved support for HDF5 and Lisp archiving of data, with support for serialization; a variety of data summary options added to EZGraph and Averager; and binomial and Poisson random number distributions. Several components have been optimized for efficiency, including the random number generators.
Swarm 2.2 also works reliably in Windows XP, fixes a number of bugs, works around drag-and-drop problems with Tcl/Tk in Windows, and includes a number of changes to speed up model execution.
The documentation set has been updated for Swarm 2.2; it is available from the [[Swarm: documentation|Swarm documentation]] page.
NEWS (user-visible changes)
* '''See the list of known bugs''', below!
* Release Notes for Swarm 2.2
** Numerous bugs have been fixed since 2.1.1
** MacOS X is now supported
** The Windows binaries for java Swarm now use the MingW compiler.
** Two new probability distributions (binomial, Poisson) have been added
to the Random library.
==Notes==
*If downloading a binary from within your web browser, you should do it in such a way that the browser never displays the file on the screen. If you save a file after viewing it, many browsers corrupt it. In Netscape, shift-clicking the url will save it directly to disk.
*The needed-software directory only applies to building Swarm from source. If you are installing one of the binary distributions, you will not be required to build any packages from source, all relevant packages will either be bundled with your distribution (such as Red Hat and Debian) and/or we provide the appropriate packages in on the ftp site, under the subdirectory relevant for that distribution (list below).
==Packaged (binary) distributions (2.2)==
The packaged (binary) distributions provide an environment against which user applications can be compiled and linked, without building the Swarm kernel from source.
===Windows binaries===
The following text describes the Cygwin distribution of Swarm for Windows. We now strongly recommend instead the MinGW release. See [[Swarm_and_MinGW]].
'''Windows users should see the MinGW package for Swarm here:''' [[Swarm_and_MinGW]] instead of using the following obsolete information, unless they really want to...
'''Windows binaries are different from previous versions!''' In Swarm 2.1.1 and earlier versions, Swarm Windows binaries were distributed as an executable file that installed Cygwin and Swarm on your computer. Swarm 2.2 is distributed by providing a special version of Cygwin that includes Swarm; this version is installed using a special version of the Cygwin setup program. Additional information and instructions are included in the [[Windows binary notes]].
The Windows binaries are installed via a setup program at:
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/cygwin/setup.exe
This program downloads and installs Cygwin and Swarm from the internet; you will need a high-speed internet connection. (Alternatives for computers without high-speed access are discussed in [[Windows binary notes]].)
Java binaries for Swarm 2.2 now use the MingW compiler (http://www.mingw.org ) instead of Sun JDK. This means they can be run outside of Cygwin. [http://www.swarm.org/swarmdocs-2.2/set/swarm.installbook.install.article.html Notes for installing Java Swarm] are in the Swarm documentation set. Java binaries for Windows are at:
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.tar.gz
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.zip
For the latest information you should check out Paul Johnson's [http://www.ku.edu/~pauljohn/SwarmFaq/SwarmOnlineFaq.html online FAQ] or consult the [[Swarm: Mailing lists]] archives.
===GNU/Linux binaries===
Paul Johnson is maintaining [http://pj.freefaculty.org/Swarm/Swarm-Packages/ RPMs and other packages] of Swarm for several Linux distributions.
Charlie Sharpsteen built a [https://launchpad.net/~sdg-team/+archive/ubuntu/stable Swarm site on Launchpad] which provides Swarm as a Ubuntu package. As of February 2015, Swarm can be installed (at least in Ubuntu 12.04) via:
sudo apt-add-repository ppa:sdg-team/stable
sudo apt-get update
sudo apt-get install libswarm2-dev gobjc-4.5
You may need to edit /usr/etc/swarm/Makefile.common to use gcc-4.5 for CC and OBJC. Ubuntu 12.04 was a long-term support (LTS) release that should be supported until in April 2017.
===MacOS X binaries===
Bill Northcott has produced binaries for MacOS X; see details at [[Swarm: MacOS X binaries]] These packages include everything other than standard Apple software needed to build and run Swarm models on Panther. Tiger (MacOS X 10.4) is the preferred operating system but older binaries for Panther are available. There are several versions of the gcc compiler provided, including bleeding edge versions built from the latest code in Apple's opensource cvs. This compiler includes Fortran, libffi and the GNU Objective-C runtime library.
===Other platforms===
Binaries for other platforms have not been developed. If you develop binaries for another platform, please let us know so they can be shared.
===Binaries of previous versions===
Legacy binaries (unmaintained) are available here:
*http://download.savannah.gnu.org/releases/swarm/binaries/old/
==Swarm source (2.4)==
The Swarm source distribution includes a complete set of swarm kernel sources and can be found at:
*http://download.savannah.gnu.org/releases/swarm/src/swarm/swarm-2.4.1.tar.gz
The user must first install (or verify the availability of) appropriate versions of the needed software in order to provide a proper compilation and execution environment for Swarm. We no longer maintain an up-to-date archive of the packages needed by Swarm, as they are readily found on the web. The list of packages needed by Swarm 2.4 is:
* Tcl/Tk -- either built from source or using -devel binary packages on your favorite distribution
* BLT 2.4z, not 3.0
* libpng 1.2.5
* zlib 1.2.2
* xpm-4.2 (or the xpm-nox package for Cygwin)
* X11R6 on Linux and MacOS X (with SDK)
* Optionally, HDF5 1.6.2
* Optionally, Java SDK 1.4.2
* GCC 3.4.4 with Objective C (gcc-4.0 is preferable particularly on non-x86 platforms such as PowerPC, Alpha etc..)
* GNU Make
Once the environment has been set up, and the source downloaded and de-tarred into an appropriate directory, the user should consult the <tt>README</tt> and <tt>INSTALL</tt> file to learn what options should be specified to the configure script that configures Swarm to the local system. Compilation and linking are done using <tt>make</tt> as usual, after this step.
You also need an explicit <tt>make install</tt> step, after the initial <tt>make build</tt> to cleanly install Swarm to an appropriate location (for example <tt>/usr/local</tt>). This is explained futher in the <tt>README</tt> and <tt>INSTALL</tt> files contained in the distribution.
After compilation and installation of Swarm a set of program libraries and header files against which Swarm applications can be compiled and linked is available.
==Known bugs and fixes==
This section describes bugs that are known to exist in the release of version 2.2 and what you can do about them.
===Error in <tt>Averager</tt> minimum, maximum values===
Swarm's <tt>Averager</tt> class (in the Analysis library) calculates statistics over values selected from a collection of objects. The '''<tt>getMin</tt>''' and '''<tt>getMax</tt>''' methods do not work, and will report values that should easily (if checked) be detected as incorrect. (Note that the Reference Guide does not mention the '''<tt>getMax</tt>''' method but it does exist.) Bug reported here 21 April 2005.
Fixes:
''Windows users'' can download new DLL files with this bug fixed. These are (thanks to Marcus Daniels):
http://www.santafe.edu/~mgd/javaswarm.dll
http://www.santafe.edu/~mgd/cygswarm-0.dll
These would overwrite the equivalent files in the Java/Swarm binary distribution.
The <tt>cygswarm-0.dll</tt> goes in <tt>Cygwin/bin</tt>.
''RPMs for Redhat Linux'' are available from Paul Johnson; see the link above on this page.
''Builds from source code'' can check out the most recent source code at Swarm's Savannah site (see [[Swarm:_development_snapshot#CVS|CVS]]), or simply fix the offending line of code:
In <tt>Averager.m</tt>, change line 106 from
'''if (totalCount == 0)'''
to
'''if (totalCount == 0 || count == 0)'''
d9d6918eb58c647b62b6dddd5436ea306a643685
2183
2182
2015-12-05T01:13:01Z
SwarmWikiSysop
5
/* Swarm source (2.2) */
wikitext
text/x-wiki
==Stable release: Swarm 2.2==
As of February, 2005, Swarm 2.2 is the new stable release. This release is the culmination of the numerous development snapshots since the previous release (Swarm 2.1.1, which was released in April, 2000).
Swarm 2.2 adds a few new capabilities to Swarm. These include improved support for HDF5 and Lisp archiving of data, with support for serialization; a variety of data summary options added to EZGraph and Averager; and binomial and Poisson random number distributions. Several components have been optimized for efficiency, including the random number generators.
Swarm 2.2 also works reliably in Windows XP, fixes a number of bugs, works around drag-and-drop problems with Tcl/Tk in Windows, and includes a number of changes to speed up model execution.
The documentation set has been updated for Swarm 2.2; it is available from the [[Swarm: documentation|Swarm documentation]] page.
NEWS (user-visible changes)
* '''See the list of known bugs''', below!
* Release Notes for Swarm 2.2
** Numerous bugs have been fixed since 2.1.1
** MacOS X is now supported
** The Windows binaries for java Swarm now use the MingW compiler.
** Two new probability distributions (binomial, Poisson) have been added
to the Random library.
==Notes==
*If downloading a binary from within your web browser, you should do it in such a way that the browser never displays the file on the screen. If you save a file after viewing it, many browsers corrupt it. In Netscape, shift-clicking the url will save it directly to disk.
*The needed-software directory only applies to building Swarm from source. If you are installing one of the binary distributions, you will not be required to build any packages from source, all relevant packages will either be bundled with your distribution (such as Red Hat and Debian) and/or we provide the appropriate packages in on the ftp site, under the subdirectory relevant for that distribution (list below).
==Packaged (binary) distributions (2.2)==
The packaged (binary) distributions provide an environment against which user applications can be compiled and linked, without building the Swarm kernel from source.
===Windows binaries===
The following text describes the Cygwin distribution of Swarm for Windows. We now strongly recommend instead the MinGW release. See [[Swarm_and_MinGW]].
'''Windows users should see the MinGW package for Swarm here:''' [[Swarm_and_MinGW]] instead of using the following obsolete information, unless they really want to...
'''Windows binaries are different from previous versions!''' In Swarm 2.1.1 and earlier versions, Swarm Windows binaries were distributed as an executable file that installed Cygwin and Swarm on your computer. Swarm 2.2 is distributed by providing a special version of Cygwin that includes Swarm; this version is installed using a special version of the Cygwin setup program. Additional information and instructions are included in the [[Windows binary notes]].
The Windows binaries are installed via a setup program at:
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/cygwin/setup.exe
This program downloads and installs Cygwin and Swarm from the internet; you will need a high-speed internet connection. (Alternatives for computers without high-speed access are discussed in [[Windows binary notes]].)
Java binaries for Swarm 2.2 now use the MingW compiler (http://www.mingw.org ) instead of Sun JDK. This means they can be run outside of Cygwin. [http://www.swarm.org/swarmdocs-2.2/set/swarm.installbook.install.article.html Notes for installing Java Swarm] are in the Swarm documentation set. Java binaries for Windows are at:
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.tar.gz
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.zip
For the latest information you should check out Paul Johnson's [http://www.ku.edu/~pauljohn/SwarmFaq/SwarmOnlineFaq.html online FAQ] or consult the [[Swarm: Mailing lists]] archives.
===GNU/Linux binaries===
Paul Johnson is maintaining [http://pj.freefaculty.org/Swarm/Swarm-Packages/ RPMs and other packages] of Swarm for several Linux distributions.
Charlie Sharpsteen built a [https://launchpad.net/~sdg-team/+archive/ubuntu/stable Swarm site on Launchpad] which provides Swarm as a Ubuntu package. As of February 2015, Swarm can be installed (at least in Ubuntu 12.04) via:
sudo apt-add-repository ppa:sdg-team/stable
sudo apt-get update
sudo apt-get install libswarm2-dev gobjc-4.5
You may need to edit /usr/etc/swarm/Makefile.common to use gcc-4.5 for CC and OBJC. Ubuntu 12.04 was a long-term support (LTS) release that should be supported until in April 2017.
===MacOS X binaries===
Bill Northcott has produced binaries for MacOS X; see details at [[Swarm: MacOS X binaries]] These packages include everything other than standard Apple software needed to build and run Swarm models on Panther. Tiger (MacOS X 10.4) is the preferred operating system but older binaries for Panther are available. There are several versions of the gcc compiler provided, including bleeding edge versions built from the latest code in Apple's opensource cvs. This compiler includes Fortran, libffi and the GNU Objective-C runtime library.
===Other platforms===
Binaries for other platforms have not been developed. If you develop binaries for another platform, please let us know so they can be shared.
===Binaries of previous versions===
Legacy binaries (unmaintained) are available here:
*http://download.savannah.gnu.org/releases/swarm/binaries/old/
==Swarm source (2.4)==
The Swarm source distribution includes a complete set of swarm kernel sources and can be found at:
*http://download.savannah.gnu.org/releases/swarm/src/swarm/swarm-2.4.1.tar.gz
The user must first install (or verify the availability of) appropriate versions of the needed software in order to provide a proper compilation and execution environment for Swarm. We no longer maintain an up-to-date archive of the packages needed by Swarm, as they are readily found on the web. The list of packages needed by Swarm 2.4 is:
* Tcl/Tk -- either built from source or using -devel binary packages on your favorite distribution
* BLT 2.4z, not 3.0
* libpng 1.2.5
* zlib 1.2.2
* xpm-4.2 (or the xpm-nox package for Cygwin)
* X11R6 on Linux and MacOS X (with SDK)
* Optionally, HDF5 1.6.2
* Optionally, Java SDK 1.4.2
* GCC 3.4.4 with Objective C (gcc-4.0 is preferable particularly on non-x86 platforms such as PowerPC, Alpha etc..)
* GNU Make
Once the environment has been set up, and the source downloaded and de-tarred into an appropriate directory, the user should consult the <tt>README</tt> and <tt>INSTALL</tt> file to learn what options should be specified to the configure script that configures Swarm to the local system. Compilation and linking are done using <tt>make</tt> as usual, after this step.
You also need an explicit <tt>make install</tt> step, after the initial <tt>make build</tt> to cleanly install Swarm to an appropriate location (for example <tt>/usr/local</tt>). This is explained futher in the <tt>README</tt> and <tt>INSTALL</tt> files contained in the distribution.
After compilation and installation of Swarm a set of program libraries and header files against which Swarm applications can be compiled and linked is available.
==Known bugs and fixes==
This section describes bugs that are known to exist in the release of version 2.2 and what you can do about them.
===Error in <tt>Averager</tt> minimum, maximum values===
Swarm's <tt>Averager</tt> class (in the Analysis library) calculates statistics over values selected from a collection of objects. The '''<tt>getMin</tt>''' and '''<tt>getMax</tt>''' methods do not work, and will report values that should easily (if checked) be detected as incorrect. (Note that the Reference Guide does not mention the '''<tt>getMax</tt>''' method but it does exist.) Bug reported here 21 April 2005.
Fixes:
''Windows users'' can download new DLL files with this bug fixed. These are (thanks to Marcus Daniels):
http://www.santafe.edu/~mgd/javaswarm.dll
http://www.santafe.edu/~mgd/cygswarm-0.dll
These would overwrite the equivalent files in the Java/Swarm binary distribution.
The <tt>cygswarm-0.dll</tt> goes in <tt>Cygwin/bin</tt>.
''RPMs for Redhat Linux'' are available from Paul Johnson; see the link above on this page.
''Builds from source code'' can check out the most recent source code at Swarm's Savannah site (see [[Swarm:_development_snapshot#CVS|CVS]]), or simply fix the offending line of code:
In <tt>Averager.m</tt>, change line 106 from
'''if (totalCount == 0)'''
to
'''if (totalCount == 0 || count == 0)'''
beb85683bc3ee69faf5d34767d8ab559425933fa
2182
2181
2015-12-05T01:10:48Z
SwarmWikiSysop
5
/* Binaries of previous versions */
wikitext
text/x-wiki
==Stable release: Swarm 2.2==
As of February, 2005, Swarm 2.2 is the new stable release. This release is the culmination of the numerous development snapshots since the previous release (Swarm 2.1.1, which was released in April, 2000).
Swarm 2.2 adds a few new capabilities to Swarm. These include improved support for HDF5 and Lisp archiving of data, with support for serialization; a variety of data summary options added to EZGraph and Averager; and binomial and Poisson random number distributions. Several components have been optimized for efficiency, including the random number generators.
Swarm 2.2 also works reliably in Windows XP, fixes a number of bugs, works around drag-and-drop problems with Tcl/Tk in Windows, and includes a number of changes to speed up model execution.
The documentation set has been updated for Swarm 2.2; it is available from the [[Swarm: documentation|Swarm documentation]] page.
NEWS (user-visible changes)
* '''See the list of known bugs''', below!
* Release Notes for Swarm 2.2
** Numerous bugs have been fixed since 2.1.1
** MacOS X is now supported
** The Windows binaries for java Swarm now use the MingW compiler.
** Two new probability distributions (binomial, Poisson) have been added
to the Random library.
==Notes==
*If downloading a binary from within your web browser, you should do it in such a way that the browser never displays the file on the screen. If you save a file after viewing it, many browsers corrupt it. In Netscape, shift-clicking the url will save it directly to disk.
*The needed-software directory only applies to building Swarm from source. If you are installing one of the binary distributions, you will not be required to build any packages from source, all relevant packages will either be bundled with your distribution (such as Red Hat and Debian) and/or we provide the appropriate packages in on the ftp site, under the subdirectory relevant for that distribution (list below).
==Packaged (binary) distributions (2.2)==
The packaged (binary) distributions provide an environment against which user applications can be compiled and linked, without building the Swarm kernel from source.
===Windows binaries===
The following text describes the Cygwin distribution of Swarm for Windows. We now strongly recommend instead the MinGW release. See [[Swarm_and_MinGW]].
'''Windows users should see the MinGW package for Swarm here:''' [[Swarm_and_MinGW]] instead of using the following obsolete information, unless they really want to...
'''Windows binaries are different from previous versions!''' In Swarm 2.1.1 and earlier versions, Swarm Windows binaries were distributed as an executable file that installed Cygwin and Swarm on your computer. Swarm 2.2 is distributed by providing a special version of Cygwin that includes Swarm; this version is installed using a special version of the Cygwin setup program. Additional information and instructions are included in the [[Windows binary notes]].
The Windows binaries are installed via a setup program at:
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/cygwin/setup.exe
This program downloads and installs Cygwin and Swarm from the internet; you will need a high-speed internet connection. (Alternatives for computers without high-speed access are discussed in [[Windows binary notes]].)
Java binaries for Swarm 2.2 now use the MingW compiler (http://www.mingw.org ) instead of Sun JDK. This means they can be run outside of Cygwin. [http://www.swarm.org/swarmdocs-2.2/set/swarm.installbook.install.article.html Notes for installing Java Swarm] are in the Swarm documentation set. Java binaries for Windows are at:
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.tar.gz
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.zip
For the latest information you should check out Paul Johnson's [http://www.ku.edu/~pauljohn/SwarmFaq/SwarmOnlineFaq.html online FAQ] or consult the [[Swarm: Mailing lists]] archives.
===GNU/Linux binaries===
Paul Johnson is maintaining [http://pj.freefaculty.org/Swarm/Swarm-Packages/ RPMs and other packages] of Swarm for several Linux distributions.
Charlie Sharpsteen built a [https://launchpad.net/~sdg-team/+archive/ubuntu/stable Swarm site on Launchpad] which provides Swarm as a Ubuntu package. As of February 2015, Swarm can be installed (at least in Ubuntu 12.04) via:
sudo apt-add-repository ppa:sdg-team/stable
sudo apt-get update
sudo apt-get install libswarm2-dev gobjc-4.5
You may need to edit /usr/etc/swarm/Makefile.common to use gcc-4.5 for CC and OBJC. Ubuntu 12.04 was a long-term support (LTS) release that should be supported until in April 2017.
===MacOS X binaries===
Bill Northcott has produced binaries for MacOS X; see details at [[Swarm: MacOS X binaries]] These packages include everything other than standard Apple software needed to build and run Swarm models on Panther. Tiger (MacOS X 10.4) is the preferred operating system but older binaries for Panther are available. There are several versions of the gcc compiler provided, including bleeding edge versions built from the latest code in Apple's opensource cvs. This compiler includes Fortran, libffi and the GNU Objective-C runtime library.
===Other platforms===
Binaries for other platforms have not been developed. If you develop binaries for another platform, please let us know so they can be shared.
===Binaries of previous versions===
Legacy binaries (unmaintained) are available here:
*http://download.savannah.gnu.org/releases/swarm/binaries/old/
==Swarm source (2.2)==
The Swarm source distribution includes a complete set of swarm kernel sources and can be found at:
*ftp://ftp.swarm.org/pub/swarm/src/swarm/swarm-2.2.tar.gz
The user must first install (or verify the availability of) appropriate versions of the needed software in order to provide a proper compilation and execution environment for Swarm. We no longer maintain an up-to-date archive of the packages needed by Swarm, as they are readily found on the web. The list of packages needed by Swarm 2.2 is:
* Tcl/Tk -- either built from source or using -devel binary packages on your favorite distribution
* BLT 2.4z, not 3.0
* libpng 1.2.5
* zlib 1.2.2
* xpm-4.2 (or the xpm-nox package for Cygwin)
* X11R6 on Linux and MacOS X (with SDK)
* Optionally, HDF5 1.6.2
* Optionally, Java SDK 1.4.2
* GCC 3.4.4 with Objective C (gcc-4.0 is preferable particularly on non-x86 platforms such as PowerPC, Alpha etc..)
* GNU Make
Once the environment has been set up, and the source downloaded and de-tarred into an appropriate directory, the user should consult the <tt>README</tt> and <tt>INSTALL</tt> file to learn what options should be specified to the configure script that configures Swarm to the local system. Compilation and linking are done using <tt>make</tt> as usual, after this step.
You also need an explicit <tt>make install</tt> step, after the initial <tt>make build</tt> to cleanly install Swarm to an appropriate location (for example <tt>/usr/local</tt>). This is explained futher in the <tt>README</tt> and <tt>INSTALL</tt> files contained in the distribution.
After compilation and installation of Swarm a set of program libraries and header files against which Swarm applications can be compiled and linked is available.
==Known bugs and fixes==
This section describes bugs that are known to exist in the release of version 2.2 and what you can do about them.
===Error in <tt>Averager</tt> minimum, maximum values===
Swarm's <tt>Averager</tt> class (in the Analysis library) calculates statistics over values selected from a collection of objects. The '''<tt>getMin</tt>''' and '''<tt>getMax</tt>''' methods do not work, and will report values that should easily (if checked) be detected as incorrect. (Note that the Reference Guide does not mention the '''<tt>getMax</tt>''' method but it does exist.) Bug reported here 21 April 2005.
Fixes:
''Windows users'' can download new DLL files with this bug fixed. These are (thanks to Marcus Daniels):
http://www.santafe.edu/~mgd/javaswarm.dll
http://www.santafe.edu/~mgd/cygswarm-0.dll
These would overwrite the equivalent files in the Java/Swarm binary distribution.
The <tt>cygswarm-0.dll</tt> goes in <tt>Cygwin/bin</tt>.
''RPMs for Redhat Linux'' are available from Paul Johnson; see the link above on this page.
''Builds from source code'' can check out the most recent source code at Swarm's Savannah site (see [[Swarm:_development_snapshot#CVS|CVS]]), or simply fix the offending line of code:
In <tt>Averager.m</tt>, change line 106 from
'''if (totalCount == 0)'''
to
'''if (totalCount == 0 || count == 0)'''
1dab610f4c2e7cc66852b86abdc1016a3d2f0dde
2181
2180
2015-12-05T01:08:52Z
SwarmWikiSysop
5
/* Windows binaries */
wikitext
text/x-wiki
==Stable release: Swarm 2.2==
As of February, 2005, Swarm 2.2 is the new stable release. This release is the culmination of the numerous development snapshots since the previous release (Swarm 2.1.1, which was released in April, 2000).
Swarm 2.2 adds a few new capabilities to Swarm. These include improved support for HDF5 and Lisp archiving of data, with support for serialization; a variety of data summary options added to EZGraph and Averager; and binomial and Poisson random number distributions. Several components have been optimized for efficiency, including the random number generators.
Swarm 2.2 also works reliably in Windows XP, fixes a number of bugs, works around drag-and-drop problems with Tcl/Tk in Windows, and includes a number of changes to speed up model execution.
The documentation set has been updated for Swarm 2.2; it is available from the [[Swarm: documentation|Swarm documentation]] page.
NEWS (user-visible changes)
* '''See the list of known bugs''', below!
* Release Notes for Swarm 2.2
** Numerous bugs have been fixed since 2.1.1
** MacOS X is now supported
** The Windows binaries for java Swarm now use the MingW compiler.
** Two new probability distributions (binomial, Poisson) have been added
to the Random library.
==Notes==
*If downloading a binary from within your web browser, you should do it in such a way that the browser never displays the file on the screen. If you save a file after viewing it, many browsers corrupt it. In Netscape, shift-clicking the url will save it directly to disk.
*The needed-software directory only applies to building Swarm from source. If you are installing one of the binary distributions, you will not be required to build any packages from source, all relevant packages will either be bundled with your distribution (such as Red Hat and Debian) and/or we provide the appropriate packages in on the ftp site, under the subdirectory relevant for that distribution (list below).
==Packaged (binary) distributions (2.2)==
The packaged (binary) distributions provide an environment against which user applications can be compiled and linked, without building the Swarm kernel from source.
===Windows binaries===
The following text describes the Cygwin distribution of Swarm for Windows. We now strongly recommend instead the MinGW release. See [[Swarm_and_MinGW]].
'''Windows users should see the MinGW package for Swarm here:''' [[Swarm_and_MinGW]] instead of using the following obsolete information, unless they really want to...
'''Windows binaries are different from previous versions!''' In Swarm 2.1.1 and earlier versions, Swarm Windows binaries were distributed as an executable file that installed Cygwin and Swarm on your computer. Swarm 2.2 is distributed by providing a special version of Cygwin that includes Swarm; this version is installed using a special version of the Cygwin setup program. Additional information and instructions are included in the [[Windows binary notes]].
The Windows binaries are installed via a setup program at:
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/cygwin/setup.exe
This program downloads and installs Cygwin and Swarm from the internet; you will need a high-speed internet connection. (Alternatives for computers without high-speed access are discussed in [[Windows binary notes]].)
Java binaries for Swarm 2.2 now use the MingW compiler (http://www.mingw.org ) instead of Sun JDK. This means they can be run outside of Cygwin. [http://www.swarm.org/swarmdocs-2.2/set/swarm.installbook.install.article.html Notes for installing Java Swarm] are in the Swarm documentation set. Java binaries for Windows are at:
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.tar.gz
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.zip
For the latest information you should check out Paul Johnson's [http://www.ku.edu/~pauljohn/SwarmFaq/SwarmOnlineFaq.html online FAQ] or consult the [[Swarm: Mailing lists]] archives.
===GNU/Linux binaries===
Paul Johnson is maintaining [http://pj.freefaculty.org/Swarm/Swarm-Packages/ RPMs and other packages] of Swarm for several Linux distributions.
Charlie Sharpsteen built a [https://launchpad.net/~sdg-team/+archive/ubuntu/stable Swarm site on Launchpad] which provides Swarm as a Ubuntu package. As of February 2015, Swarm can be installed (at least in Ubuntu 12.04) via:
sudo apt-add-repository ppa:sdg-team/stable
sudo apt-get update
sudo apt-get install libswarm2-dev gobjc-4.5
You may need to edit /usr/etc/swarm/Makefile.common to use gcc-4.5 for CC and OBJC. Ubuntu 12.04 was a long-term support (LTS) release that should be supported until in April 2017.
===MacOS X binaries===
Bill Northcott has produced binaries for MacOS X; see details at [[Swarm: MacOS X binaries]] These packages include everything other than standard Apple software needed to build and run Swarm models on Panther. Tiger (MacOS X 10.4) is the preferred operating system but older binaries for Panther are available. There are several versions of the gcc compiler provided, including bleeding edge versions built from the latest code in Apple's opensource cvs. This compiler includes Fortran, libffi and the GNU Objective-C runtime library.
===Other platforms===
Binaries for other platforms have not been developed. If you develop binaries for another platform, please let us know so they can be shared.
===Binaries of previous versions===
Legacy binaries (unmaintained) are available here:
*http://ftp.swarm.org/pub/swarm/binaries/old/
<!-- commented out obsoleted binaries
* Windows 9x, Windows NT 4, or Windows 2000.
o Development Kit Note: very large (50 MB), you may wish to order a CD-ROM
o
Demos
*
Debian GNU/Linux 2.2.
o
ix86
o
sparc
* Red Hat GNU/Linux.
o
Red Hat 6.1 / x86
o
Red Hat 6.1 / sparc
o
LinuxPPC R5 (1999)
*
SuSE 6.3 GNU/Linux.
o
x86
*
Solaris 2.7.
o
Sparc
-->
==Swarm source (2.2)==
The Swarm source distribution includes a complete set of swarm kernel sources and can be found at:
*ftp://ftp.swarm.org/pub/swarm/src/swarm/swarm-2.2.tar.gz
The user must first install (or verify the availability of) appropriate versions of the needed software in order to provide a proper compilation and execution environment for Swarm. We no longer maintain an up-to-date archive of the packages needed by Swarm, as they are readily found on the web. The list of packages needed by Swarm 2.2 is:
* Tcl/Tk -- either built from source or using -devel binary packages on your favorite distribution
* BLT 2.4z, not 3.0
* libpng 1.2.5
* zlib 1.2.2
* xpm-4.2 (or the xpm-nox package for Cygwin)
* X11R6 on Linux and MacOS X (with SDK)
* Optionally, HDF5 1.6.2
* Optionally, Java SDK 1.4.2
* GCC 3.4.4 with Objective C (gcc-4.0 is preferable particularly on non-x86 platforms such as PowerPC, Alpha etc..)
* GNU Make
Once the environment has been set up, and the source downloaded and de-tarred into an appropriate directory, the user should consult the <tt>README</tt> and <tt>INSTALL</tt> file to learn what options should be specified to the configure script that configures Swarm to the local system. Compilation and linking are done using <tt>make</tt> as usual, after this step.
You also need an explicit <tt>make install</tt> step, after the initial <tt>make build</tt> to cleanly install Swarm to an appropriate location (for example <tt>/usr/local</tt>). This is explained futher in the <tt>README</tt> and <tt>INSTALL</tt> files contained in the distribution.
After compilation and installation of Swarm a set of program libraries and header files against which Swarm applications can be compiled and linked is available.
==Known bugs and fixes==
This section describes bugs that are known to exist in the release of version 2.2 and what you can do about them.
===Error in <tt>Averager</tt> minimum, maximum values===
Swarm's <tt>Averager</tt> class (in the Analysis library) calculates statistics over values selected from a collection of objects. The '''<tt>getMin</tt>''' and '''<tt>getMax</tt>''' methods do not work, and will report values that should easily (if checked) be detected as incorrect. (Note that the Reference Guide does not mention the '''<tt>getMax</tt>''' method but it does exist.) Bug reported here 21 April 2005.
Fixes:
''Windows users'' can download new DLL files with this bug fixed. These are (thanks to Marcus Daniels):
http://www.santafe.edu/~mgd/javaswarm.dll
http://www.santafe.edu/~mgd/cygswarm-0.dll
These would overwrite the equivalent files in the Java/Swarm binary distribution.
The <tt>cygswarm-0.dll</tt> goes in <tt>Cygwin/bin</tt>.
''RPMs for Redhat Linux'' are available from Paul Johnson; see the link above on this page.
''Builds from source code'' can check out the most recent source code at Swarm's Savannah site (see [[Swarm:_development_snapshot#CVS|CVS]]), or simply fix the offending line of code:
In <tt>Averager.m</tt>, change line 106 from
'''if (totalCount == 0)'''
to
'''if (totalCount == 0 || count == 0)'''
5b8fdd96e1230c7f2a909c06c182eb6de7627ac6
2180
2179
2015-12-05T01:06:13Z
SwarmWikiSysop
5
/* Windows binaries */
wikitext
text/x-wiki
==Stable release: Swarm 2.2==
As of February, 2005, Swarm 2.2 is the new stable release. This release is the culmination of the numerous development snapshots since the previous release (Swarm 2.1.1, which was released in April, 2000).
Swarm 2.2 adds a few new capabilities to Swarm. These include improved support for HDF5 and Lisp archiving of data, with support for serialization; a variety of data summary options added to EZGraph and Averager; and binomial and Poisson random number distributions. Several components have been optimized for efficiency, including the random number generators.
Swarm 2.2 also works reliably in Windows XP, fixes a number of bugs, works around drag-and-drop problems with Tcl/Tk in Windows, and includes a number of changes to speed up model execution.
The documentation set has been updated for Swarm 2.2; it is available from the [[Swarm: documentation|Swarm documentation]] page.
NEWS (user-visible changes)
* '''See the list of known bugs''', below!
* Release Notes for Swarm 2.2
** Numerous bugs have been fixed since 2.1.1
** MacOS X is now supported
** The Windows binaries for java Swarm now use the MingW compiler.
** Two new probability distributions (binomial, Poisson) have been added
to the Random library.
==Notes==
*If downloading a binary from within your web browser, you should do it in such a way that the browser never displays the file on the screen. If you save a file after viewing it, many browsers corrupt it. In Netscape, shift-clicking the url will save it directly to disk.
*The needed-software directory only applies to building Swarm from source. If you are installing one of the binary distributions, you will not be required to build any packages from source, all relevant packages will either be bundled with your distribution (such as Red Hat and Debian) and/or we provide the appropriate packages in on the ftp site, under the subdirectory relevant for that distribution (list below).
==Packaged (binary) distributions (2.2)==
The packaged (binary) distributions provide an environment against which user applications can be compiled and linked, without building the Swarm kernel from source.
===Windows binaries===
The following text describes the Cygwin distribution of Swarm for Windows. We now strongly recommend instead the MinGW release. See [[Swarm_and_MinGW]].
'''Windows binaries are different from previous versions!''' In Swarm 2.1.1 and earlier versions, Swarm Windows binaries were distributed as an executable file that installed Cygwin and Swarm on your computer. Swarm 2.2 is distributed by providing a special version of Cygwin that includes Swarm; this version is installed using a special version of the Cygwin setup program. Additional information and instructions are included in the [[Windows binary notes]].
The Windows binaries are installed via a setup program at:
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/cygwin/setup.exe
This program downloads and installs Cygwin and Swarm from the internet; you will need a high-speed internet connection. (Alternatives for computers without high-speed access are discussed in [[Windows binary notes]].)
Java binaries for Swarm 2.2 now use the MingW compiler (http://www.mingw.org ) instead of Sun JDK. This means they can be run outside of Cygwin. [http://www.swarm.org/swarmdocs-2.2/set/swarm.installbook.install.article.html Notes for installing Java Swarm] are in the Swarm documentation set. Java binaries for Windows are at:
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.tar.gz
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.zip
For the latest information you should check out Paul Johnson's [http://www.ku.edu/~pauljohn/SwarmFaq/SwarmOnlineFaq.html online FAQ] or consult the [[Swarm: Mailing lists]] archives.
===GNU/Linux binaries===
Paul Johnson is maintaining [http://pj.freefaculty.org/Swarm/Swarm-Packages/ RPMs and other packages] of Swarm for several Linux distributions.
Charlie Sharpsteen built a [https://launchpad.net/~sdg-team/+archive/ubuntu/stable Swarm site on Launchpad] which provides Swarm as a Ubuntu package. As of February 2015, Swarm can be installed (at least in Ubuntu 12.04) via:
sudo apt-add-repository ppa:sdg-team/stable
sudo apt-get update
sudo apt-get install libswarm2-dev gobjc-4.5
You may need to edit /usr/etc/swarm/Makefile.common to use gcc-4.5 for CC and OBJC. Ubuntu 12.04 was a long-term support (LTS) release that should be supported until in April 2017.
===MacOS X binaries===
Bill Northcott has produced binaries for MacOS X; see details at [[Swarm: MacOS X binaries]] These packages include everything other than standard Apple software needed to build and run Swarm models on Panther. Tiger (MacOS X 10.4) is the preferred operating system but older binaries for Panther are available. There are several versions of the gcc compiler provided, including bleeding edge versions built from the latest code in Apple's opensource cvs. This compiler includes Fortran, libffi and the GNU Objective-C runtime library.
===Other platforms===
Binaries for other platforms have not been developed. If you develop binaries for another platform, please let us know so they can be shared.
===Binaries of previous versions===
Legacy binaries (unmaintained) are available here:
*http://ftp.swarm.org/pub/swarm/binaries/old/
<!-- commented out obsoleted binaries
* Windows 9x, Windows NT 4, or Windows 2000.
o Development Kit Note: very large (50 MB), you may wish to order a CD-ROM
o
Demos
*
Debian GNU/Linux 2.2.
o
ix86
o
sparc
* Red Hat GNU/Linux.
o
Red Hat 6.1 / x86
o
Red Hat 6.1 / sparc
o
LinuxPPC R5 (1999)
*
SuSE 6.3 GNU/Linux.
o
x86
*
Solaris 2.7.
o
Sparc
-->
==Swarm source (2.2)==
The Swarm source distribution includes a complete set of swarm kernel sources and can be found at:
*ftp://ftp.swarm.org/pub/swarm/src/swarm/swarm-2.2.tar.gz
The user must first install (or verify the availability of) appropriate versions of the needed software in order to provide a proper compilation and execution environment for Swarm. We no longer maintain an up-to-date archive of the packages needed by Swarm, as they are readily found on the web. The list of packages needed by Swarm 2.2 is:
* Tcl/Tk -- either built from source or using -devel binary packages on your favorite distribution
* BLT 2.4z, not 3.0
* libpng 1.2.5
* zlib 1.2.2
* xpm-4.2 (or the xpm-nox package for Cygwin)
* X11R6 on Linux and MacOS X (with SDK)
* Optionally, HDF5 1.6.2
* Optionally, Java SDK 1.4.2
* GCC 3.4.4 with Objective C (gcc-4.0 is preferable particularly on non-x86 platforms such as PowerPC, Alpha etc..)
* GNU Make
Once the environment has been set up, and the source downloaded and de-tarred into an appropriate directory, the user should consult the <tt>README</tt> and <tt>INSTALL</tt> file to learn what options should be specified to the configure script that configures Swarm to the local system. Compilation and linking are done using <tt>make</tt> as usual, after this step.
You also need an explicit <tt>make install</tt> step, after the initial <tt>make build</tt> to cleanly install Swarm to an appropriate location (for example <tt>/usr/local</tt>). This is explained futher in the <tt>README</tt> and <tt>INSTALL</tt> files contained in the distribution.
After compilation and installation of Swarm a set of program libraries and header files against which Swarm applications can be compiled and linked is available.
==Known bugs and fixes==
This section describes bugs that are known to exist in the release of version 2.2 and what you can do about them.
===Error in <tt>Averager</tt> minimum, maximum values===
Swarm's <tt>Averager</tt> class (in the Analysis library) calculates statistics over values selected from a collection of objects. The '''<tt>getMin</tt>''' and '''<tt>getMax</tt>''' methods do not work, and will report values that should easily (if checked) be detected as incorrect. (Note that the Reference Guide does not mention the '''<tt>getMax</tt>''' method but it does exist.) Bug reported here 21 April 2005.
Fixes:
''Windows users'' can download new DLL files with this bug fixed. These are (thanks to Marcus Daniels):
http://www.santafe.edu/~mgd/javaswarm.dll
http://www.santafe.edu/~mgd/cygswarm-0.dll
These would overwrite the equivalent files in the Java/Swarm binary distribution.
The <tt>cygswarm-0.dll</tt> goes in <tt>Cygwin/bin</tt>.
''RPMs for Redhat Linux'' are available from Paul Johnson; see the link above on this page.
''Builds from source code'' can check out the most recent source code at Swarm's Savannah site (see [[Swarm:_development_snapshot#CVS|CVS]]), or simply fix the offending line of code:
In <tt>Averager.m</tt>, change line 106 from
'''if (totalCount == 0)'''
to
'''if (totalCount == 0 || count == 0)'''
36c28c5b9927e2b7c2ba37e424603616572963dd
2179
2178
2015-12-05T01:04:17Z
SwarmWikiSysop
5
/* Windows binaries */
wikitext
text/x-wiki
==Stable release: Swarm 2.2==
As of February, 2005, Swarm 2.2 is the new stable release. This release is the culmination of the numerous development snapshots since the previous release (Swarm 2.1.1, which was released in April, 2000).
Swarm 2.2 adds a few new capabilities to Swarm. These include improved support for HDF5 and Lisp archiving of data, with support for serialization; a variety of data summary options added to EZGraph and Averager; and binomial and Poisson random number distributions. Several components have been optimized for efficiency, including the random number generators.
Swarm 2.2 also works reliably in Windows XP, fixes a number of bugs, works around drag-and-drop problems with Tcl/Tk in Windows, and includes a number of changes to speed up model execution.
The documentation set has been updated for Swarm 2.2; it is available from the [[Swarm: documentation|Swarm documentation]] page.
NEWS (user-visible changes)
* '''See the list of known bugs''', below!
* Release Notes for Swarm 2.2
** Numerous bugs have been fixed since 2.1.1
** MacOS X is now supported
** The Windows binaries for java Swarm now use the MingW compiler.
** Two new probability distributions (binomial, Poisson) have been added
to the Random library.
==Notes==
*If downloading a binary from within your web browser, you should do it in such a way that the browser never displays the file on the screen. If you save a file after viewing it, many browsers corrupt it. In Netscape, shift-clicking the url will save it directly to disk.
*The needed-software directory only applies to building Swarm from source. If you are installing one of the binary distributions, you will not be required to build any packages from source, all relevant packages will either be bundled with your distribution (such as Red Hat and Debian) and/or we provide the appropriate packages in on the ftp site, under the subdirectory relevant for that distribution (list below).
==Packaged (binary) distributions (2.2)==
The packaged (binary) distributions provide an environment against which user applications can be compiled and linked, without building the Swarm kernel from source.
===Windows binaries===
The following text describes the Cygwin distribution of Swarm for Windows. We now strongly recommend instead the MinGW release. See
'''Windows binaries are different from previous versions!''' In Swarm 2.1.1 and earlier versions, Swarm Windows binaries were distributed as an executable file that installed Cygwin and Swarm on your computer. Swarm 2.2 is distributed by providing a special version of Cygwin that includes Swarm; this version is installed using a special version of the Cygwin setup program. Additional information and instructions are included in the [[Windows binary notes]].
The Windows binaries are installed via a setup program at:
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/cygwin/setup.exe
This program downloads and installs Cygwin and Swarm from the internet; you will need a high-speed internet connection. (Alternatives for computers without high-speed access are discussed in [[Windows binary notes]].)
Java binaries for Swarm 2.2 now use the MingW compiler (http://www.mingw.org ) instead of Sun JDK. This means they can be run outside of Cygwin. [http://www.swarm.org/swarmdocs-2.2/set/swarm.installbook.install.article.html Notes for installing Java Swarm] are in the Swarm documentation set. Java binaries for Windows are at:
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.tar.gz
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.zip
For the latest information you should check out Paul Johnson's [http://www.ku.edu/~pauljohn/SwarmFaq/SwarmOnlineFaq.html online FAQ] or consult the [[Swarm: Mailing lists]] archives.
===GNU/Linux binaries===
Paul Johnson is maintaining [http://pj.freefaculty.org/Swarm/Swarm-Packages/ RPMs and other packages] of Swarm for several Linux distributions.
Charlie Sharpsteen built a [https://launchpad.net/~sdg-team/+archive/ubuntu/stable Swarm site on Launchpad] which provides Swarm as a Ubuntu package. As of February 2015, Swarm can be installed (at least in Ubuntu 12.04) via:
sudo apt-add-repository ppa:sdg-team/stable
sudo apt-get update
sudo apt-get install libswarm2-dev gobjc-4.5
You may need to edit /usr/etc/swarm/Makefile.common to use gcc-4.5 for CC and OBJC. Ubuntu 12.04 was a long-term support (LTS) release that should be supported until in April 2017.
===MacOS X binaries===
Bill Northcott has produced binaries for MacOS X; see details at [[Swarm: MacOS X binaries]] These packages include everything other than standard Apple software needed to build and run Swarm models on Panther. Tiger (MacOS X 10.4) is the preferred operating system but older binaries for Panther are available. There are several versions of the gcc compiler provided, including bleeding edge versions built from the latest code in Apple's opensource cvs. This compiler includes Fortran, libffi and the GNU Objective-C runtime library.
===Other platforms===
Binaries for other platforms have not been developed. If you develop binaries for another platform, please let us know so they can be shared.
===Binaries of previous versions===
Legacy binaries (unmaintained) are available here:
*http://ftp.swarm.org/pub/swarm/binaries/old/
<!-- commented out obsoleted binaries
* Windows 9x, Windows NT 4, or Windows 2000.
o Development Kit Note: very large (50 MB), you may wish to order a CD-ROM
o
Demos
*
Debian GNU/Linux 2.2.
o
ix86
o
sparc
* Red Hat GNU/Linux.
o
Red Hat 6.1 / x86
o
Red Hat 6.1 / sparc
o
LinuxPPC R5 (1999)
*
SuSE 6.3 GNU/Linux.
o
x86
*
Solaris 2.7.
o
Sparc
-->
==Swarm source (2.2)==
The Swarm source distribution includes a complete set of swarm kernel sources and can be found at:
*ftp://ftp.swarm.org/pub/swarm/src/swarm/swarm-2.2.tar.gz
The user must first install (or verify the availability of) appropriate versions of the needed software in order to provide a proper compilation and execution environment for Swarm. We no longer maintain an up-to-date archive of the packages needed by Swarm, as they are readily found on the web. The list of packages needed by Swarm 2.2 is:
* Tcl/Tk -- either built from source or using -devel binary packages on your favorite distribution
* BLT 2.4z, not 3.0
* libpng 1.2.5
* zlib 1.2.2
* xpm-4.2 (or the xpm-nox package for Cygwin)
* X11R6 on Linux and MacOS X (with SDK)
* Optionally, HDF5 1.6.2
* Optionally, Java SDK 1.4.2
* GCC 3.4.4 with Objective C (gcc-4.0 is preferable particularly on non-x86 platforms such as PowerPC, Alpha etc..)
* GNU Make
Once the environment has been set up, and the source downloaded and de-tarred into an appropriate directory, the user should consult the <tt>README</tt> and <tt>INSTALL</tt> file to learn what options should be specified to the configure script that configures Swarm to the local system. Compilation and linking are done using <tt>make</tt> as usual, after this step.
You also need an explicit <tt>make install</tt> step, after the initial <tt>make build</tt> to cleanly install Swarm to an appropriate location (for example <tt>/usr/local</tt>). This is explained futher in the <tt>README</tt> and <tt>INSTALL</tt> files contained in the distribution.
After compilation and installation of Swarm a set of program libraries and header files against which Swarm applications can be compiled and linked is available.
==Known bugs and fixes==
This section describes bugs that are known to exist in the release of version 2.2 and what you can do about them.
===Error in <tt>Averager</tt> minimum, maximum values===
Swarm's <tt>Averager</tt> class (in the Analysis library) calculates statistics over values selected from a collection of objects. The '''<tt>getMin</tt>''' and '''<tt>getMax</tt>''' methods do not work, and will report values that should easily (if checked) be detected as incorrect. (Note that the Reference Guide does not mention the '''<tt>getMax</tt>''' method but it does exist.) Bug reported here 21 April 2005.
Fixes:
''Windows users'' can download new DLL files with this bug fixed. These are (thanks to Marcus Daniels):
http://www.santafe.edu/~mgd/javaswarm.dll
http://www.santafe.edu/~mgd/cygswarm-0.dll
These would overwrite the equivalent files in the Java/Swarm binary distribution.
The <tt>cygswarm-0.dll</tt> goes in <tt>Cygwin/bin</tt>.
''RPMs for Redhat Linux'' are available from Paul Johnson; see the link above on this page.
''Builds from source code'' can check out the most recent source code at Swarm's Savannah site (see [[Swarm:_development_snapshot#CVS|CVS]]), or simply fix the offending line of code:
In <tt>Averager.m</tt>, change line 106 from
'''if (totalCount == 0)'''
to
'''if (totalCount == 0 || count == 0)'''
b9369af5b59e828245d04547ce55d1735912664e
2178
2177
2015-12-05T00:59:49Z
SwarmWikiSysop
5
/* GNU/Linux binaries */
wikitext
text/x-wiki
==Stable release: Swarm 2.2==
As of February, 2005, Swarm 2.2 is the new stable release. This release is the culmination of the numerous development snapshots since the previous release (Swarm 2.1.1, which was released in April, 2000).
Swarm 2.2 adds a few new capabilities to Swarm. These include improved support for HDF5 and Lisp archiving of data, with support for serialization; a variety of data summary options added to EZGraph and Averager; and binomial and Poisson random number distributions. Several components have been optimized for efficiency, including the random number generators.
Swarm 2.2 also works reliably in Windows XP, fixes a number of bugs, works around drag-and-drop problems with Tcl/Tk in Windows, and includes a number of changes to speed up model execution.
The documentation set has been updated for Swarm 2.2; it is available from the [[Swarm: documentation|Swarm documentation]] page.
NEWS (user-visible changes)
* '''See the list of known bugs''', below!
* Release Notes for Swarm 2.2
** Numerous bugs have been fixed since 2.1.1
** MacOS X is now supported
** The Windows binaries for java Swarm now use the MingW compiler.
** Two new probability distributions (binomial, Poisson) have been added
to the Random library.
==Notes==
*If downloading a binary from within your web browser, you should do it in such a way that the browser never displays the file on the screen. If you save a file after viewing it, many browsers corrupt it. In Netscape, shift-clicking the url will save it directly to disk.
*The needed-software directory only applies to building Swarm from source. If you are installing one of the binary distributions, you will not be required to build any packages from source, all relevant packages will either be bundled with your distribution (such as Red Hat and Debian) and/or we provide the appropriate packages in on the ftp site, under the subdirectory relevant for that distribution (list below).
==Packaged (binary) distributions (2.2)==
The packaged (binary) distributions provide an environment against which user applications can be compiled and linked, without building the Swarm kernel from source.
===Windows binaries===
'''Windows binaries are different from previous versions!''' In Swarm 2.1.1 and earlier versions, Swarm Windows binaries were distributed as an executable file that installed Cygwin and Swarm on your computer. Swarm 2.2 is distributed by providing a special version of Cygwin that includes Swarm; this version is installed using a special version of the Cygwin setup program. Additional information and instructions are included in the [[Windows binary notes]].
The Windows binaries are installed via a setup program at:
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/cygwin/setup.exe
This program downloads and installs Cygwin and Swarm from the internet; you will need a high-speed internet connection. (Alternatives for computers without high-speed access are discussed in [[Windows binary notes]].)
Java binaries for Swarm 2.2 now use the MingW compiler (http://www.mingw.org ) instead of Sun JDK. This means they can be run outside of Cygwin. [http://www.swarm.org/swarmdocs-2.2/set/swarm.installbook.install.article.html Notes for installing Java Swarm] are in the Swarm documentation set. Java binaries for Windows are at:
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.tar.gz
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.zip
For the latest information you should check out Paul Johnson's [http://www.ku.edu/~pauljohn/SwarmFaq/SwarmOnlineFaq.html online FAQ] or consult the [[Swarm: Mailing lists]] archives.
===GNU/Linux binaries===
Paul Johnson is maintaining [http://pj.freefaculty.org/Swarm/Swarm-Packages/ RPMs and other packages] of Swarm for several Linux distributions.
Charlie Sharpsteen built a [https://launchpad.net/~sdg-team/+archive/ubuntu/stable Swarm site on Launchpad] which provides Swarm as a Ubuntu package. As of February 2015, Swarm can be installed (at least in Ubuntu 12.04) via:
sudo apt-add-repository ppa:sdg-team/stable
sudo apt-get update
sudo apt-get install libswarm2-dev gobjc-4.5
You may need to edit /usr/etc/swarm/Makefile.common to use gcc-4.5 for CC and OBJC. Ubuntu 12.04 was a long-term support (LTS) release that should be supported until in April 2017.
===MacOS X binaries===
Bill Northcott has produced binaries for MacOS X; see details at [[Swarm: MacOS X binaries]] These packages include everything other than standard Apple software needed to build and run Swarm models on Panther. Tiger (MacOS X 10.4) is the preferred operating system but older binaries for Panther are available. There are several versions of the gcc compiler provided, including bleeding edge versions built from the latest code in Apple's opensource cvs. This compiler includes Fortran, libffi and the GNU Objective-C runtime library.
===Other platforms===
Binaries for other platforms have not been developed. If you develop binaries for another platform, please let us know so they can be shared.
===Binaries of previous versions===
Legacy binaries (unmaintained) are available here:
*http://ftp.swarm.org/pub/swarm/binaries/old/
<!-- commented out obsoleted binaries
* Windows 9x, Windows NT 4, or Windows 2000.
o Development Kit Note: very large (50 MB), you may wish to order a CD-ROM
o
Demos
*
Debian GNU/Linux 2.2.
o
ix86
o
sparc
* Red Hat GNU/Linux.
o
Red Hat 6.1 / x86
o
Red Hat 6.1 / sparc
o
LinuxPPC R5 (1999)
*
SuSE 6.3 GNU/Linux.
o
x86
*
Solaris 2.7.
o
Sparc
-->
==Swarm source (2.2)==
The Swarm source distribution includes a complete set of swarm kernel sources and can be found at:
*ftp://ftp.swarm.org/pub/swarm/src/swarm/swarm-2.2.tar.gz
The user must first install (or verify the availability of) appropriate versions of the needed software in order to provide a proper compilation and execution environment for Swarm. We no longer maintain an up-to-date archive of the packages needed by Swarm, as they are readily found on the web. The list of packages needed by Swarm 2.2 is:
* Tcl/Tk -- either built from source or using -devel binary packages on your favorite distribution
* BLT 2.4z, not 3.0
* libpng 1.2.5
* zlib 1.2.2
* xpm-4.2 (or the xpm-nox package for Cygwin)
* X11R6 on Linux and MacOS X (with SDK)
* Optionally, HDF5 1.6.2
* Optionally, Java SDK 1.4.2
* GCC 3.4.4 with Objective C (gcc-4.0 is preferable particularly on non-x86 platforms such as PowerPC, Alpha etc..)
* GNU Make
Once the environment has been set up, and the source downloaded and de-tarred into an appropriate directory, the user should consult the <tt>README</tt> and <tt>INSTALL</tt> file to learn what options should be specified to the configure script that configures Swarm to the local system. Compilation and linking are done using <tt>make</tt> as usual, after this step.
You also need an explicit <tt>make install</tt> step, after the initial <tt>make build</tt> to cleanly install Swarm to an appropriate location (for example <tt>/usr/local</tt>). This is explained futher in the <tt>README</tt> and <tt>INSTALL</tt> files contained in the distribution.
After compilation and installation of Swarm a set of program libraries and header files against which Swarm applications can be compiled and linked is available.
==Known bugs and fixes==
This section describes bugs that are known to exist in the release of version 2.2 and what you can do about them.
===Error in <tt>Averager</tt> minimum, maximum values===
Swarm's <tt>Averager</tt> class (in the Analysis library) calculates statistics over values selected from a collection of objects. The '''<tt>getMin</tt>''' and '''<tt>getMax</tt>''' methods do not work, and will report values that should easily (if checked) be detected as incorrect. (Note that the Reference Guide does not mention the '''<tt>getMax</tt>''' method but it does exist.) Bug reported here 21 April 2005.
Fixes:
''Windows users'' can download new DLL files with this bug fixed. These are (thanks to Marcus Daniels):
http://www.santafe.edu/~mgd/javaswarm.dll
http://www.santafe.edu/~mgd/cygswarm-0.dll
These would overwrite the equivalent files in the Java/Swarm binary distribution.
The <tt>cygswarm-0.dll</tt> goes in <tt>Cygwin/bin</tt>.
''RPMs for Redhat Linux'' are available from Paul Johnson; see the link above on this page.
''Builds from source code'' can check out the most recent source code at Swarm's Savannah site (see [[Swarm:_development_snapshot#CVS|CVS]]), or simply fix the offending line of code:
In <tt>Averager.m</tt>, change line 106 from
'''if (totalCount == 0)'''
to
'''if (totalCount == 0 || count == 0)'''
850cf0ffb8a2812e4f031d3c5c71bbb6e84fbf4e
2177
2154
2015-12-05T00:53:29Z
SwarmWikiSysop
5
/* GNU/Linux binaries */
wikitext
text/x-wiki
==Stable release: Swarm 2.2==
As of February, 2005, Swarm 2.2 is the new stable release. This release is the culmination of the numerous development snapshots since the previous release (Swarm 2.1.1, which was released in April, 2000).
Swarm 2.2 adds a few new capabilities to Swarm. These include improved support for HDF5 and Lisp archiving of data, with support for serialization; a variety of data summary options added to EZGraph and Averager; and binomial and Poisson random number distributions. Several components have been optimized for efficiency, including the random number generators.
Swarm 2.2 also works reliably in Windows XP, fixes a number of bugs, works around drag-and-drop problems with Tcl/Tk in Windows, and includes a number of changes to speed up model execution.
The documentation set has been updated for Swarm 2.2; it is available from the [[Swarm: documentation|Swarm documentation]] page.
NEWS (user-visible changes)
* '''See the list of known bugs''', below!
* Release Notes for Swarm 2.2
** Numerous bugs have been fixed since 2.1.1
** MacOS X is now supported
** The Windows binaries for java Swarm now use the MingW compiler.
** Two new probability distributions (binomial, Poisson) have been added
to the Random library.
==Notes==
*If downloading a binary from within your web browser, you should do it in such a way that the browser never displays the file on the screen. If you save a file after viewing it, many browsers corrupt it. In Netscape, shift-clicking the url will save it directly to disk.
*The needed-software directory only applies to building Swarm from source. If you are installing one of the binary distributions, you will not be required to build any packages from source, all relevant packages will either be bundled with your distribution (such as Red Hat and Debian) and/or we provide the appropriate packages in on the ftp site, under the subdirectory relevant for that distribution (list below).
==Packaged (binary) distributions (2.2)==
The packaged (binary) distributions provide an environment against which user applications can be compiled and linked, without building the Swarm kernel from source.
===Windows binaries===
'''Windows binaries are different from previous versions!''' In Swarm 2.1.1 and earlier versions, Swarm Windows binaries were distributed as an executable file that installed Cygwin and Swarm on your computer. Swarm 2.2 is distributed by providing a special version of Cygwin that includes Swarm; this version is installed using a special version of the Cygwin setup program. Additional information and instructions are included in the [[Windows binary notes]].
The Windows binaries are installed via a setup program at:
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/cygwin/setup.exe
This program downloads and installs Cygwin and Swarm from the internet; you will need a high-speed internet connection. (Alternatives for computers without high-speed access are discussed in [[Windows binary notes]].)
Java binaries for Swarm 2.2 now use the MingW compiler (http://www.mingw.org ) instead of Sun JDK. This means they can be run outside of Cygwin. [http://www.swarm.org/swarmdocs-2.2/set/swarm.installbook.install.article.html Notes for installing Java Swarm] are in the Swarm documentation set. Java binaries for Windows are at:
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.tar.gz
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.zip
For the latest information you should check out Paul Johnson's [http://www.ku.edu/~pauljohn/SwarmFaq/SwarmOnlineFaq.html online FAQ] or consult the [[Swarm: Mailing lists]] archives.
===GNU/Linux binaries===
Paul Johnson is maintaining [http://lark.cc.ku.edu/~pauljohn/Swarm/ RPMs] of Swarm for Fedora Core Linux (and Red Hat 9 if practical).
Charlie Sharpsteen built a [https://launchpad.net/~sdg-team/+archive/ubuntu/stable Swarm site on Launchpad] which provides Swarm as a Ubuntu package. As of February 2015, Swarm can be installed (at least in Ubuntu 12.04) via:
sudo apt-add-repository ppa:sdg-team/stable
sudo apt-get update
sudo apt-get install libswarm2-dev gobjc-4.5
You may need to edit /usr/etc/swarm/Makefile.common to use gcc-4.5 for CC and OBJC. Ubuntu 12.04 was a long-term support (LTS) release that should be supported until in April 2017.
===MacOS X binaries===
Bill Northcott has produced binaries for MacOS X; see details at [[Swarm: MacOS X binaries]] These packages include everything other than standard Apple software needed to build and run Swarm models on Panther. Tiger (MacOS X 10.4) is the preferred operating system but older binaries for Panther are available. There are several versions of the gcc compiler provided, including bleeding edge versions built from the latest code in Apple's opensource cvs. This compiler includes Fortran, libffi and the GNU Objective-C runtime library.
===Other platforms===
Binaries for other platforms have not been developed. If you develop binaries for another platform, please let us know so they can be shared.
===Binaries of previous versions===
Legacy binaries (unmaintained) are available here:
*http://ftp.swarm.org/pub/swarm/binaries/old/
<!-- commented out obsoleted binaries
* Windows 9x, Windows NT 4, or Windows 2000.
o Development Kit Note: very large (50 MB), you may wish to order a CD-ROM
o
Demos
*
Debian GNU/Linux 2.2.
o
ix86
o
sparc
* Red Hat GNU/Linux.
o
Red Hat 6.1 / x86
o
Red Hat 6.1 / sparc
o
LinuxPPC R5 (1999)
*
SuSE 6.3 GNU/Linux.
o
x86
*
Solaris 2.7.
o
Sparc
-->
==Swarm source (2.2)==
The Swarm source distribution includes a complete set of swarm kernel sources and can be found at:
*ftp://ftp.swarm.org/pub/swarm/src/swarm/swarm-2.2.tar.gz
The user must first install (or verify the availability of) appropriate versions of the needed software in order to provide a proper compilation and execution environment for Swarm. We no longer maintain an up-to-date archive of the packages needed by Swarm, as they are readily found on the web. The list of packages needed by Swarm 2.2 is:
* Tcl/Tk -- either built from source or using -devel binary packages on your favorite distribution
* BLT 2.4z, not 3.0
* libpng 1.2.5
* zlib 1.2.2
* xpm-4.2 (or the xpm-nox package for Cygwin)
* X11R6 on Linux and MacOS X (with SDK)
* Optionally, HDF5 1.6.2
* Optionally, Java SDK 1.4.2
* GCC 3.4.4 with Objective C (gcc-4.0 is preferable particularly on non-x86 platforms such as PowerPC, Alpha etc..)
* GNU Make
Once the environment has been set up, and the source downloaded and de-tarred into an appropriate directory, the user should consult the <tt>README</tt> and <tt>INSTALL</tt> file to learn what options should be specified to the configure script that configures Swarm to the local system. Compilation and linking are done using <tt>make</tt> as usual, after this step.
You also need an explicit <tt>make install</tt> step, after the initial <tt>make build</tt> to cleanly install Swarm to an appropriate location (for example <tt>/usr/local</tt>). This is explained futher in the <tt>README</tt> and <tt>INSTALL</tt> files contained in the distribution.
After compilation and installation of Swarm a set of program libraries and header files against which Swarm applications can be compiled and linked is available.
==Known bugs and fixes==
This section describes bugs that are known to exist in the release of version 2.2 and what you can do about them.
===Error in <tt>Averager</tt> minimum, maximum values===
Swarm's <tt>Averager</tt> class (in the Analysis library) calculates statistics over values selected from a collection of objects. The '''<tt>getMin</tt>''' and '''<tt>getMax</tt>''' methods do not work, and will report values that should easily (if checked) be detected as incorrect. (Note that the Reference Guide does not mention the '''<tt>getMax</tt>''' method but it does exist.) Bug reported here 21 April 2005.
Fixes:
''Windows users'' can download new DLL files with this bug fixed. These are (thanks to Marcus Daniels):
http://www.santafe.edu/~mgd/javaswarm.dll
http://www.santafe.edu/~mgd/cygswarm-0.dll
These would overwrite the equivalent files in the Java/Swarm binary distribution.
The <tt>cygswarm-0.dll</tt> goes in <tt>Cygwin/bin</tt>.
''RPMs for Redhat Linux'' are available from Paul Johnson; see the link above on this page.
''Builds from source code'' can check out the most recent source code at Swarm's Savannah site (see [[Swarm:_development_snapshot#CVS|CVS]]), or simply fix the offending line of code:
In <tt>Averager.m</tt>, change line 106 from
'''if (totalCount == 0)'''
to
'''if (totalCount == 0 || count == 0)'''
da9ce659ff2d31fb9a3d5412d645cc94152bd44d
2154
18
2015-12-02T22:36:57Z
SwarmWikiSysop
5
/* Windows binaries */
wikitext
text/x-wiki
==Stable release: Swarm 2.2==
As of February, 2005, Swarm 2.2 is the new stable release. This release is the culmination of the numerous development snapshots since the previous release (Swarm 2.1.1, which was released in April, 2000).
Swarm 2.2 adds a few new capabilities to Swarm. These include improved support for HDF5 and Lisp archiving of data, with support for serialization; a variety of data summary options added to EZGraph and Averager; and binomial and Poisson random number distributions. Several components have been optimized for efficiency, including the random number generators.
Swarm 2.2 also works reliably in Windows XP, fixes a number of bugs, works around drag-and-drop problems with Tcl/Tk in Windows, and includes a number of changes to speed up model execution.
The documentation set has been updated for Swarm 2.2; it is available from the [[Swarm: documentation|Swarm documentation]] page.
NEWS (user-visible changes)
* '''See the list of known bugs''', below!
* Release Notes for Swarm 2.2
** Numerous bugs have been fixed since 2.1.1
** MacOS X is now supported
** The Windows binaries for java Swarm now use the MingW compiler.
** Two new probability distributions (binomial, Poisson) have been added
to the Random library.
==Notes==
*If downloading a binary from within your web browser, you should do it in such a way that the browser never displays the file on the screen. If you save a file after viewing it, many browsers corrupt it. In Netscape, shift-clicking the url will save it directly to disk.
*The needed-software directory only applies to building Swarm from source. If you are installing one of the binary distributions, you will not be required to build any packages from source, all relevant packages will either be bundled with your distribution (such as Red Hat and Debian) and/or we provide the appropriate packages in on the ftp site, under the subdirectory relevant for that distribution (list below).
==Packaged (binary) distributions (2.2)==
The packaged (binary) distributions provide an environment against which user applications can be compiled and linked, without building the Swarm kernel from source.
===Windows binaries===
'''Windows binaries are different from previous versions!''' In Swarm 2.1.1 and earlier versions, Swarm Windows binaries were distributed as an executable file that installed Cygwin and Swarm on your computer. Swarm 2.2 is distributed by providing a special version of Cygwin that includes Swarm; this version is installed using a special version of the Cygwin setup program. Additional information and instructions are included in the [[Windows binary notes]].
The Windows binaries are installed via a setup program at:
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/cygwin/setup.exe
This program downloads and installs Cygwin and Swarm from the internet; you will need a high-speed internet connection. (Alternatives for computers without high-speed access are discussed in [[Windows binary notes]].)
Java binaries for Swarm 2.2 now use the MingW compiler (http://www.mingw.org ) instead of Sun JDK. This means they can be run outside of Cygwin. [http://www.swarm.org/swarmdocs-2.2/set/swarm.installbook.install.article.html Notes for installing Java Swarm] are in the Swarm documentation set. Java binaries for Windows are at:
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.tar.gz
*http://download.savannah.gnu.org/releases/swarm/binaries/w32/Swarm-2.2-java.zip
For the latest information you should check out Paul Johnson's [http://www.ku.edu/~pauljohn/SwarmFaq/SwarmOnlineFaq.html online FAQ] or consult the [[Swarm: Mailing lists]] archives.
===GNU/Linux binaries===
Paul Johnson is maintaining [http://lark.cc.ku.edu/~pauljohn/Swarm/ RPMs] of Swarm for Fedora Core Linux (and Red Hat 9 if practical).
===MacOS X binaries===
Bill Northcott has produced binaries for MacOS X; see details at [[Swarm: MacOS X binaries]] These packages include everything other than standard Apple software needed to build and run Swarm models on Panther. Tiger (MacOS X 10.4) is the preferred operating system but older binaries for Panther are available. There are several versions of the gcc compiler provided, including bleeding edge versions built from the latest code in Apple's opensource cvs. This compiler includes Fortran, libffi and the GNU Objective-C runtime library.
===Other platforms===
Binaries for other platforms have not been developed. If you develop binaries for another platform, please let us know so they can be shared.
===Binaries of previous versions===
Legacy binaries (unmaintained) are available here:
*http://ftp.swarm.org/pub/swarm/binaries/old/
<!-- commented out obsoleted binaries
* Windows 9x, Windows NT 4, or Windows 2000.
o Development Kit Note: very large (50 MB), you may wish to order a CD-ROM
o
Demos
*
Debian GNU/Linux 2.2.
o
ix86
o
sparc
* Red Hat GNU/Linux.
o
Red Hat 6.1 / x86
o
Red Hat 6.1 / sparc
o
LinuxPPC R5 (1999)
*
SuSE 6.3 GNU/Linux.
o
x86
*
Solaris 2.7.
o
Sparc
-->
==Swarm source (2.2)==
The Swarm source distribution includes a complete set of swarm kernel sources and can be found at:
*ftp://ftp.swarm.org/pub/swarm/src/swarm/swarm-2.2.tar.gz
The user must first install (or verify the availability of) appropriate versions of the needed software in order to provide a proper compilation and execution environment for Swarm. We no longer maintain an up-to-date archive of the packages needed by Swarm, as they are readily found on the web. The list of packages needed by Swarm 2.2 is:
* Tcl/Tk -- either built from source or using -devel binary packages on your favorite distribution
* BLT 2.4z, not 3.0
* libpng 1.2.5
* zlib 1.2.2
* xpm-4.2 (or the xpm-nox package for Cygwin)
* X11R6 on Linux and MacOS X (with SDK)
* Optionally, HDF5 1.6.2
* Optionally, Java SDK 1.4.2
* GCC 3.4.4 with Objective C (gcc-4.0 is preferable particularly on non-x86 platforms such as PowerPC, Alpha etc..)
* GNU Make
Once the environment has been set up, and the source downloaded and de-tarred into an appropriate directory, the user should consult the <tt>README</tt> and <tt>INSTALL</tt> file to learn what options should be specified to the configure script that configures Swarm to the local system. Compilation and linking are done using <tt>make</tt> as usual, after this step.
You also need an explicit <tt>make install</tt> step, after the initial <tt>make build</tt> to cleanly install Swarm to an appropriate location (for example <tt>/usr/local</tt>). This is explained futher in the <tt>README</tt> and <tt>INSTALL</tt> files contained in the distribution.
After compilation and installation of Swarm a set of program libraries and header files against which Swarm applications can be compiled and linked is available.
==Known bugs and fixes==
This section describes bugs that are known to exist in the release of version 2.2 and what you can do about them.
===Error in <tt>Averager</tt> minimum, maximum values===
Swarm's <tt>Averager</tt> class (in the Analysis library) calculates statistics over values selected from a collection of objects. The '''<tt>getMin</tt>''' and '''<tt>getMax</tt>''' methods do not work, and will report values that should easily (if checked) be detected as incorrect. (Note that the Reference Guide does not mention the '''<tt>getMax</tt>''' method but it does exist.) Bug reported here 21 April 2005.
Fixes:
''Windows users'' can download new DLL files with this bug fixed. These are (thanks to Marcus Daniels):
http://www.santafe.edu/~mgd/javaswarm.dll
http://www.santafe.edu/~mgd/cygswarm-0.dll
These would overwrite the equivalent files in the Java/Swarm binary distribution.
The <tt>cygswarm-0.dll</tt> goes in <tt>Cygwin/bin</tt>.
''RPMs for Redhat Linux'' are available from Paul Johnson; see the link above on this page.
''Builds from source code'' can check out the most recent source code at Swarm's Savannah site (see [[Swarm:_development_snapshot#CVS|CVS]]), or simply fix the offending line of code:
In <tt>Averager.m</tt>, change line 106 from
'''if (totalCount == 0)'''
to
'''if (totalCount == 0 || count == 0)'''
2814ba98b26c5dd1f4e373bfce04586e092e7b40
18
2015-03-07T05:51:33Z
Pauljohn32
1
Created page with "==Stable release: Swarm 2.2== As of February, 2005, Swarm 2.2 is the new stable release. This release is the culmination of the numerous development snapshots since the previ..."
wikitext
text/x-wiki
==Stable release: Swarm 2.2==
As of February, 2005, Swarm 2.2 is the new stable release. This release is the culmination of the numerous development snapshots since the previous release (Swarm 2.1.1, which was released in April, 2000).
Swarm 2.2 adds a few new capabilities to Swarm. These include improved support for HDF5 and Lisp archiving of data, with support for serialization; a variety of data summary options added to EZGraph and Averager; and binomial and Poisson random number distributions. Several components have been optimized for efficiency, including the random number generators.
Swarm 2.2 also works reliably in Windows XP, fixes a number of bugs, works around drag-and-drop problems with Tcl/Tk in Windows, and includes a number of changes to speed up model execution.
The documentation set has been updated for Swarm 2.2; it is available from the [[Swarm: documentation|Swarm documentation]] page.
NEWS (user-visible changes)
* '''See the list of known bugs''', below!
* Release Notes for Swarm 2.2
** Numerous bugs have been fixed since 2.1.1
** MacOS X is now supported
** The Windows binaries for java Swarm now use the MingW compiler.
** Two new probability distributions (binomial, Poisson) have been added
to the Random library.
==Notes==
*If downloading a binary from within your web browser, you should do it in such a way that the browser never displays the file on the screen. If you save a file after viewing it, many browsers corrupt it. In Netscape, shift-clicking the url will save it directly to disk.
*The needed-software directory only applies to building Swarm from source. If you are installing one of the binary distributions, you will not be required to build any packages from source, all relevant packages will either be bundled with your distribution (such as Red Hat and Debian) and/or we provide the appropriate packages in on the ftp site, under the subdirectory relevant for that distribution (list below).
==Packaged (binary) distributions (2.2)==
The packaged (binary) distributions provide an environment against which user applications can be compiled and linked, without building the Swarm kernel from source.
===Windows binaries===
'''Windows binaries are different from previous versions!''' In Swarm 2.1.1 and earlier versions, Swarm Windows binaries were distributed as an executable file that installed Cygwin and Swarm on your computer. Swarm 2.2 is distributed by providing a special version of Cygwin that includes Swarm; this version is installed using a special version of the Cygwin setup program. Additional information and instructions are included in the [[Windows binary notes]].
The Windows binaries are installed via a setup program at:
*http://ftp.swarm.org/pub/swarm/binaries/w32/cygwin/setup.exe
This program downloads and installs Cygwin and Swarm from the internet; you will need a high-speed internet connection. (Alternatives for computers without high-speed access are discussed in [[Windows binary notes]].)
Java binaries for Swarm 2.2 now use the MingW compiler (http://www.mingw.org ) instead of Sun JDK. This means they can be run outside of Cygwin. [http://www.swarm.org/swarmdocs-2.2/set/swarm.installbook.install.article.html Notes for installing Java Swarm] are in the Swarm documentation set. Java binaries for Windows are at:
*http://ftp.swarm.org/pub/swarm/binaries/w32/Swarm-2.2-java.tar.gz
*http://ftp.swarm.org/pub/swarm/binaries/w32/Swarm-2.2-java.zip
For the latest information you should check out Paul Johnson's [http://www.ku.edu/~pauljohn/SwarmFaq/SwarmOnlineFaq.html online FAQ] or consult the [[Swarm: Mailing lists]] archives.
===GNU/Linux binaries===
Paul Johnson is maintaining [http://lark.cc.ku.edu/~pauljohn/Swarm/ RPMs] of Swarm for Fedora Core Linux (and Red Hat 9 if practical).
===MacOS X binaries===
Bill Northcott has produced binaries for MacOS X; see details at [[Swarm: MacOS X binaries]] These packages include everything other than standard Apple software needed to build and run Swarm models on Panther. Tiger (MacOS X 10.4) is the preferred operating system but older binaries for Panther are available. There are several versions of the gcc compiler provided, including bleeding edge versions built from the latest code in Apple's opensource cvs. This compiler includes Fortran, libffi and the GNU Objective-C runtime library.
===Other platforms===
Binaries for other platforms have not been developed. If you develop binaries for another platform, please let us know so they can be shared.
===Binaries of previous versions===
Legacy binaries (unmaintained) are available here:
*http://ftp.swarm.org/pub/swarm/binaries/old/
<!-- commented out obsoleted binaries
* Windows 9x, Windows NT 4, or Windows 2000.
o Development Kit Note: very large (50 MB), you may wish to order a CD-ROM
o
Demos
*
Debian GNU/Linux 2.2.
o
ix86
o
sparc
* Red Hat GNU/Linux.
o
Red Hat 6.1 / x86
o
Red Hat 6.1 / sparc
o
LinuxPPC R5 (1999)
*
SuSE 6.3 GNU/Linux.
o
x86
*
Solaris 2.7.
o
Sparc
-->
==Swarm source (2.2)==
The Swarm source distribution includes a complete set of swarm kernel sources and can be found at:
*ftp://ftp.swarm.org/pub/swarm/src/swarm/swarm-2.2.tar.gz
The user must first install (or verify the availability of) appropriate versions of the needed software in order to provide a proper compilation and execution environment for Swarm. We no longer maintain an up-to-date archive of the packages needed by Swarm, as they are readily found on the web. The list of packages needed by Swarm 2.2 is:
* Tcl/Tk -- either built from source or using -devel binary packages on your favorite distribution
* BLT 2.4z, not 3.0
* libpng 1.2.5
* zlib 1.2.2
* xpm-4.2 (or the xpm-nox package for Cygwin)
* X11R6 on Linux and MacOS X (with SDK)
* Optionally, HDF5 1.6.2
* Optionally, Java SDK 1.4.2
* GCC 3.4.4 with Objective C (gcc-4.0 is preferable particularly on non-x86 platforms such as PowerPC, Alpha etc..)
* GNU Make
Once the environment has been set up, and the source downloaded and de-tarred into an appropriate directory, the user should consult the <tt>README</tt> and <tt>INSTALL</tt> file to learn what options should be specified to the configure script that configures Swarm to the local system. Compilation and linking are done using <tt>make</tt> as usual, after this step.
You also need an explicit <tt>make install</tt> step, after the initial <tt>make build</tt> to cleanly install Swarm to an appropriate location (for example <tt>/usr/local</tt>). This is explained futher in the <tt>README</tt> and <tt>INSTALL</tt> files contained in the distribution.
After compilation and installation of Swarm a set of program libraries and header files against which Swarm applications can be compiled and linked is available.
==Known bugs and fixes==
This section describes bugs that are known to exist in the release of version 2.2 and what you can do about them.
===Error in <tt>Averager</tt> minimum, maximum values===
Swarm's <tt>Averager</tt> class (in the Analysis library) calculates statistics over values selected from a collection of objects. The '''<tt>getMin</tt>''' and '''<tt>getMax</tt>''' methods do not work, and will report values that should easily (if checked) be detected as incorrect. (Note that the Reference Guide does not mention the '''<tt>getMax</tt>''' method but it does exist.) Bug reported here 21 April 2005.
Fixes:
''Windows users'' can download new DLL files with this bug fixed. These are (thanks to Marcus Daniels):
http://www.santafe.edu/~mgd/javaswarm.dll
http://www.santafe.edu/~mgd/cygswarm-0.dll
These would overwrite the equivalent files in the Java/Swarm binary distribution.
The <tt>cygswarm-0.dll</tt> goes in <tt>Cygwin/bin</tt>.
''RPMs for Redhat Linux'' are available from Paul Johnson; see the link above on this page.
''Builds from source code'' can check out the most recent source code at Swarm's Savannah site (see [[Swarm:_development_snapshot#CVS|CVS]]), or simply fix the offending line of code:
In <tt>Averager.m</tt>, change line 106 from
'''if (totalCount == 0)'''
to
'''if (totalCount == 0 || count == 0)'''
a4f0326789516d73d55b5f4e3de0f876972bc697
File:AoA and Bylaws-signed.pdf
6
1664
2233
2022-08-19T22:05:44Z
Gepr
9
Copy of the Articles of Amendment (amending the Articles of Incorporation) and the Bylaws.
wikitext
text/x-wiki
Copy of the Articles of Amendment (amending the Articles of Incorporation) and the Bylaws.
cfb9c363c2d9b9e8067a92022023cae817a696ae
File:Frogs 2015-02-4 view.png
6
18
31
2015-10-05T21:15:47Z
Railsback
2
Test file
wikitext
text/x-wiki
Test file
13f59ca81ca01c147b6c425183bbd058e680331f
File:MinGW Setup.png
6
1652
2166
2015-12-03T01:46:41Z
SwarmWikiSysop
5
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:MinGW Shell.png
6
1653
2167
2015-12-03T01:47:18Z
SwarmWikiSysop
5
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:RapidEE 1.png
6
1654
2168
2015-12-03T01:47:48Z
SwarmWikiSysop
5
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:RapidEE 2.png
6
1655
2169
2015-12-03T01:48:06Z
SwarmWikiSysop
5
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:RapidEE 3.png
6
1656
2170
2015-12-03T01:48:26Z
SwarmWikiSysop
5
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
File:Running Heatbugs.png
6
1650
2160
2015-12-03T01:32:01Z
SwarmWikiSysop
5
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709